# HG changeset patch # User Sam Lantinga # Date 1279087514 25200 # Node ID 7b5e4396bcaa6aea0d156a3ddbab253635d7e35a # Parent f18bc99355074393783dd812e32ddf6858b53a42 Added test case for maximize code diff -r f18bc9935507 -r 7b5e4396bcaa test/common.c --- a/test/common.c Tue Jul 13 22:39:46 2010 -0700 +++ b/test/common.c Tue Jul 13 23:05:14 2010 -0700 @@ -1077,6 +1077,19 @@ /* 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 */