[PATCH weston 2/2] libweston-desktop: fix unsetting fullscreen/maximize with wl_shell

Giulio Camuffo giuliocamuffo at gmail.com
Sun Sep 4 15:50:47 UTC 2016


---
 libweston-desktop/wl-shell.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/libweston-desktop/wl-shell.c b/libweston-desktop/wl-shell.c
index 74ce473..7172449 100644
--- a/libweston-desktop/wl-shell.c
+++ b/libweston-desktop/wl-shell.c
@@ -151,6 +151,17 @@ weston_desktop_wl_shell_change_state(struct weston_desktop_wl_shell_surface *sur
 
 	assert(state != NONE);
 
+	if (surface->state != state) {
+		if (surface->state == MAXIMIZED)
+			weston_desktop_api_maximized_requested(surface->desktop,
+								surface->surface,
+								false);
+		else if (surface->state == FULLSCREEN)
+			weston_desktop_api_fullscreen_requested(surface->desktop,
+								surface->surface,
+								false, NULL);
+	}
+
 	if (to_add && surface->added) {
 		surface->state = state;
 		return;
-- 
2.9.3



More information about the wayland-devel mailing list