comparison test/common.c @ 4517:7b5e4396bcaa

Added test case for maximize code
author Sam Lantinga <slouken@libsdl.org>
date Tue, 13 Jul 2010 23:05:14 -0700
parents 524dfefd554c
children 3ce59cbecaa3
comparison
equal deleted inserted replaced
4516:f18bc9935507 4517:7b5e4396bcaa
1075 case SDLK_g: 1075 case SDLK_g:
1076 if (event->key.keysym.mod & KMOD_CTRL) { 1076 if (event->key.keysym.mod & KMOD_CTRL) {
1077 /* Ctrl-G toggle grab */ 1077 /* Ctrl-G toggle grab */
1078 } 1078 }
1079 break; 1079 break;
1080 case SDLK_m:
1081 if (event->key.keysym.mod & KMOD_CTRL) {
1082 /* Ctrl-M maximize */
1083 /* FIXME: Which window has focus for this keyboard? */
1084 for (i = 0; i < state->num_windows; ++i) {
1085 if (SDL_GetWindowFlags(state->windows[i]) & SDL_WINDOW_MAXIMIZED) {
1086 SDL_RestoreWindow(state->windows[i]);
1087 } else {
1088 SDL_MaximizeWindow(state->windows[i]);
1089 }
1090 }
1091 }
1092 break;
1080 case SDLK_z: 1093 case SDLK_z:
1081 if (event->key.keysym.mod & KMOD_CTRL) { 1094 if (event->key.keysym.mod & KMOD_CTRL) {
1082 /* Ctrl-Z minimize */ 1095 /* Ctrl-Z minimize */
1083 /* FIXME: Which window has focus for this keyboard? */ 1096 /* FIXME: Which window has focus for this keyboard? */
1084 for (i = 0; i < state->num_windows; ++i) { 1097 for (i = 0; i < state->num_windows; ++i) {