From: Emilio Pozuelo Monfort <[email protected]>

Before maximizing or unmaximizing a window, first tell the
client to unfullscreen the window. This fixes a crash in weston
because we ended up thinking the surface was fullscreened when
it wasn't.
---
 desktop-shell/shell.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 7d85a7b..30bd273 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -3845,6 +3845,10 @@ maximize_binding(struct weston_seat *seat, uint32_t 
time, uint32_t button, void
        if (!shell_surface_is_xdg_surface(shsurf))
                return;
 
+       /* First un-fullscreen if needed */
+       if (shsurf->state.fullscreen)
+               xdg_surface_send_request_unset_fullscreen(shsurf->resource);
+
        if (shsurf->state.maximized)
                xdg_surface_send_request_unset_maximized(shsurf->resource);
        else
-- 
1.8.5.3

_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to