Commit 9727655b896b69e73b187815d0a4e1fc68701128

Sylvain 2021-04-26T14:22:19

SDL_test_common: add other window flags: --shown, --hidden, --input-focus, --mouse-focus

diff --git a/src/test/SDL_test_common.c b/src/test/SDL_test_common.c
index 6c21439..0b5bc0e 100644
--- a/src/test/SDL_test_common.c
+++ b/src/test/SDL_test_common.c
@@ -36,6 +36,7 @@ static const char *video_usage[] = {
     "[--min-geometry WxH]", "[--max-geometry WxH]", "[--logical WxH]",
     "[--scale N]", "[--depth N]", "[--refresh R]", "[--vsync]", "[--noframe]",
     "[--resizable]", "[--minimize]", "[--maximize]", "[--grab]", "[--keyboard-grab]",
+    "[--shown]", "[--hidden]", "[--input-focus]", "[--mouse-focus]",
     "[--allow-highdpi]", "[--usable-bounds]"
 };
 
@@ -424,6 +425,22 @@ SDLTest_CommonArg(SDLTest_CommonState * state, int index)
         state->window_flags |= SDL_WINDOW_MAXIMIZED;
         return 1;
     }
+    if (SDL_strcasecmp(argv[index], "--shown") == 0) {
+        state->window_flags |= SDL_WINDOW_SHOWN;
+        return 1;
+    }
+    if (SDL_strcasecmp(argv[index], "--hidden") == 0) {
+        state->window_flags |= SDL_WINDOW_HIDDEN;
+        return 1;
+    }
+    if (SDL_strcasecmp(argv[index], "--input-focus") == 0) {
+        state->window_flags |= SDL_WINDOW_INPUT_FOCUS;
+        return 1;
+    }
+    if (SDL_strcasecmp(argv[index], "--mouse-focus") == 0) {
+        state->window_flags |= SDL_WINDOW_MOUSE_FOCUS;
+        return 1;
+    }
     if (SDL_strcasecmp(argv[index], "--grab") == 0) {
         state->window_flags |= SDL_WINDOW_MOUSE_GRABBED;
         return 1;