From 70353dace36f8f3e28337145fcb75463ac1db60e Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Fri, 11 Dec 2020 22:23:58 +0200 Subject: [PATCH] desktop-shell: Refuse to set a surface to maximized For a surface that is already fullscreen making it maximized means to exit fullscreen then set to it maximized. Instead of doing it, refuse to do anything until the user explicitly performs that operation. With this approach we follow other DE (desktop environments) which would not perform any operation until the user exits fullscreen state. Fixes #321 Signed-off-by: Marius Vlad --- desktop-shell/shell.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 0b686b92..53d804ca 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -2685,6 +2685,9 @@ set_maximized(struct shell_surface *shsurf, bool maximized) weston_desktop_surface_get_surface(shsurf->desktop_surface); int32_t width = 0, height = 0; + if (weston_desktop_surface_get_fullscreen(desktop_surface)) + return; + if (maximized) { struct weston_output *output;