[PATCH] shell: Set a surface as TOPLEVEL instead of the old surface types.

Rafael Antognolli rafael.antognolli at intel.com
Thu Dec 5 12:53:17 PST 2013


Since internally there's no more SHELL_SURFACE_FULLSCREEN and
SHELL_SURFACE_MAXIMIZED, the surface must be set to
SHELL_SURFACE_TOPLEVEL on the respective functions.

This fixes the bug when clients start already in fullscreen mode. In
that case, they aren't set first to toplevel, and then change to
fullscreen. They are set as fullscreen directly, not receiving the
SHELL_SURFACE_TOPLEVEL type on the set_fullscreen function.
---
 desktop-shell/shell.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c
index 7c202ea..0b6a97c 100644
--- a/desktop-shell/shell.c
+++ b/desktop-shell/shell.c
@@ -2168,6 +2168,7 @@ shell_surface_set_transient(struct wl_client *client,
 	shell_surface_set_parent(shsurf, parent);
 
 	surface_clear_next_states(shsurf);
+	shsurf->next_type = SHELL_SURFACE_TOPLEVEL;
 	set_transient(shsurf, parent, x, y, flags);
 }
 
@@ -2242,6 +2243,7 @@ shell_surface_set_fullscreen(struct wl_client *client,
 	shell_surface_set_parent(shsurf, NULL);
 
 	surface_clear_next_states(shsurf);
+	shsurf->next_type = SHELL_SURFACE_TOPLEVEL;
 	shsurf->next_state.fullscreen = true;
 	shsurf->state_changed = true;
 	set_fullscreen(shsurf, method, framerate, output);
@@ -2340,6 +2342,7 @@ shell_surface_set_maximized(struct wl_client *client,
 	shell_surface_set_parent(shsurf, NULL);
 
 	surface_clear_next_states(shsurf);
+	shsurf->next_type = SHELL_SURFACE_TOPLEVEL;
 	shsurf->next_state.maximized = true;
 	shsurf->state_changed = true;
 	set_maximized(shsurf, output);
-- 
1.8.3.1



More information about the wayland-devel mailing list