Browse Source

wayland: Keep the fullscreen check for maximize/restore events

Ethan Lee 3 years ago
parent
commit
1fb1aa1983
1 changed files with 7 additions and 5 deletions
  1. 7 5
      src/video/wayland/SDL_waylandwindow.c

+ 7 - 5
src/video/wayland/SDL_waylandwindow.c

@@ -243,11 +243,13 @@ handle_configure_xdg_toplevel(void *data,
          *
          * No, we do not get minimize events from xdg-shell.
          */
-        SDL_SendWindowEvent(window,
-                            maximized ?
-                                SDL_WINDOWEVENT_MAXIMIZED :
-                                SDL_WINDOWEVENT_RESTORED,
-                            0, 0);
+        if (!fullscreen) {
+            SDL_SendWindowEvent(window,
+                                maximized ?
+                                    SDL_WINDOWEVENT_MAXIMIZED :
+                                    SDL_WINDOWEVENT_RESTORED,
+                                0, 0);
+        }
     }
 
     if (width == 0 || height == 0) {