Mercurial > sdl-ios-xcode
changeset 4517:7b5e4396bcaa
Added test case for maximize code
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Tue, 13 Jul 2010 23:05:14 -0700 |
parents | f18bc9935507 |
children | a956a315fe67 |
files | test/common.c |
diffstat | 1 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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 */