Added test case for maximize code
authorSam Lantinga <slouken@libsdl.org>
Tue, 13 Jul 2010 23:05:14 -0700
changeset 4517 7b5e4396bcaa
parent 4516 f18bc9935507
child 4518 a956a315fe67
Added test case for maximize code
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 */