Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Added test case for maximize code

  • Loading branch information
slouken committed Jul 14, 2010
1 parent 3819573 commit 1cc0dad4c7cd0edadc19047de182c052f0469595
Showing with 13 additions and 0 deletions.
  1. +13 −0 test/common.c
@@ -1077,6 +1077,19 @@ CommonEvent(CommonState * state, SDL_Event * event, int *done)
/* Ctrl-G toggle grab */
}
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:
if (event->key.keysym.mod & KMOD_CTRL) {
/* Ctrl-Z minimize */

0 comments on commit 1cc0dad

Please sign in to comment.