From 41fbf6f7fd44df488d349a43742e5620f9430cea Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Thu, 5 Dec 2013 22:31:25 -0800 Subject: [PATCH] desktop-shell: Make set_toplevel() clear surface states This is used from wl_shell and xwayland and we need to make sure xwayland also gets this behavior. --- desktop-shell/shell.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 3a1981d..558a313 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -2121,6 +2121,8 @@ surface_clear_next_states(struct shell_surface *shsurf) static void set_toplevel(struct shell_surface *shsurf) { + shell_surface_set_parent(shsurf, NULL); + surface_clear_next_states(shsurf); shsurf->next_type = SHELL_SURFACE_TOPLEVEL; /* The layer_link is updated in set_surface_type(), @@ -2133,9 +2135,6 @@ shell_surface_set_toplevel(struct wl_client *client, { struct shell_surface *surface = wl_resource_get_user_data(resource); - shell_surface_set_parent(surface, NULL); - - surface_clear_next_states(surface); set_toplevel(surface); } -- 2.7.4