Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Added test case for maximize code
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Jul 14, 2010
1 parent 3819573 commit 1cc0dad
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/common.c
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -1077,6 +1077,19 @@ CommonEvent(CommonState * state, SDL_Event * event, int *done)
/* Ctrl-G toggle grab */ /* Ctrl-G toggle grab */
} }
break; break;
case SDLK_m:
if (event->key.keysym.mod & KMOD_CTRL) {
/* Ctrl-M maximize */
/* FIXME: Which window has focus for this keyboard? */
for (i = 0; i < state->num_windows; ++i) {
if (SDL_GetWindowFlags(state->windows[i]) & SDL_WINDOW_MAXIMIZED) {
SDL_RestoreWindow(state->windows[i]);
} else {
SDL_MaximizeWindow(state->windows[i]);
}
}
}
break;
case SDLK_z: case SDLK_z:
if (event->key.keysym.mod & KMOD_CTRL) { if (event->key.keysym.mod & KMOD_CTRL) {
/* Ctrl-Z minimize */ /* Ctrl-Z minimize */
Expand Down

0 comments on commit 1cc0dad

Please sign in to comment.