SDL: Merge commit '50f2eb7d41fbba7c82630e55ead4ecf9c32f4c69' into main

https://github.com/libsdl-org/SDL/commit/d11fb83680d291a7a357d75804dccafac29ef4ee

From 50f2eb7d41fbba7c82630e55ead4ecf9c32f4c69 Mon Sep 17 00:00:00 2001
From: Frank Praznik <[EMAIL REDACTED]>
Date: Thu, 12 Jan 2023 15:36:35 -0500
Subject: [PATCH] wayland: Perform a round trip when maximizing and restoring
 windows

Perform a round trip when maximizing and restoring windows so the changes have already taken effect when the associated functions return.
---
 src/video/wayland/SDL_waylandwindow.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c
index 325b45a1552a..84b2ca9fd403 100644
--- a/src/video/wayland/SDL_waylandwindow.c
+++ b/src/video/wayland/SDL_waylandwindow.c
@@ -1720,7 +1720,7 @@ void Wayland_RestoreWindow(_THIS, SDL_Window *window)
             xdg_toplevel_unset_maximized(wind->shell_surface.xdg.roleobj.toplevel);
         }
 
-    WAYLAND_wl_display_flush(viddata->display);
+    WAYLAND_wl_display_roundtrip(viddata->display);
 }
 
 void Wayland_SetWindowBordered(_THIS, SDL_Window *window, SDL_bool bordered)
@@ -1799,7 +1799,7 @@ void Wayland_MaximizeWindow(_THIS, SDL_Window *window)
         xdg_toplevel_set_maximized(wind->shell_surface.xdg.roleobj.toplevel);
     }
 
-    WAYLAND_wl_display_flush(viddata->display);
+    WAYLAND_wl_display_roundtrip(viddata->display);
 }
 
 void Wayland_MinimizeWindow(_THIS, SDL_Window *window)