[PATCH weston 2/2] desktop-shell: Handle the fullscreen to maximized case safely

Derek Foreman derekf at osg.samsung.com
Fri Oct 6 19:37:45 UTC 2017


When a client transitions from maximized to fullscreen to maximized (run
weston-terminal, maximize it, hit f11 twice) we're sending size 0,0 for
the unfullscreen configure, which still has maximized set.

This results in clients correctly picking any size they like, and weston
disconnecting them for it.

Instead, pass the correct maximized size.

Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
---
 desktop-shell/shell.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 9e73d4a3..29530c24 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -2607,6 +2607,8 @@ set_fullscreen(struct shell_surface *shsurf, bool fullscreen,
 
 		width = shsurf->output->width;
 		height = shsurf->output->height;
+	} else if (weston_desktop_surface_get_maximized(desktop_surface)) {
+		get_maximized_size(shsurf, &width, &height);
 	}
 	weston_desktop_surface_set_fullscreen(desktop_surface, fullscreen);
 	weston_desktop_surface_set_size(desktop_surface, width, height);
-- 
2.14.2



More information about the wayland-devel mailing list