SDL: wayland: Keep the fullscreen check for maximize/restore events

From 1fb1aa19830e681552a4c47d682f970161dbd436 Mon Sep 17 00:00:00 2001
From: Ethan Lee <[EMAIL REDACTED]>
Date: Mon, 2 Aug 2021 12:57:28 -0400
Subject: [PATCH] wayland: Keep the fullscreen check for maximize/restore
 events

---
 src/video/wayland/SDL_waylandwindow.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c
index 6d3283497..5940f0b7c 100644
--- a/src/video/wayland/SDL_waylandwindow.c
+++ b/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) {