From 213bfc194e889232a30fb3fb92159e128a76591a Mon Sep 17 00:00:00 2001
From: Ethan Lee <[EMAIL REDACTED]>
Date: Sun, 18 Apr 2021 09:36:54 -0400
Subject: [PATCH] wayland: Implement RestoreWindow for xdg/zxdg
---
src/video/wayland/SDL_waylandwindow.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c
index a3029f033..54226981f 100644
--- a/src/video/wayland/SDL_waylandwindow.c
+++ b/src/video/wayland/SDL_waylandwindow.c
@@ -681,8 +681,11 @@ Wayland_RestoreWindow(_THIS, SDL_Window * window)
SDL_WindowData *wind = window->driverdata;
const SDL_VideoData *viddata = (const SDL_VideoData *) _this->driverdata;
+ /* Note that xdg-shell does NOT provide a way to unset minimize! */
if (viddata->shell.xdg) {
+ xdg_toplevel_unset_maximized(wind->shell_surface.xdg.roleobj.toplevel);
} else if (viddata->shell.zxdg) {
+ zxdg_toplevel_v6_unset_maximized(wind->shell_surface.zxdg.roleobj.toplevel);
} else {
wl_shell_surface_set_toplevel(wind->shell_surface.wl);
}