From 762b166c35306f7b76887145a2a8b817c0f24623 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg?= Date: Thu, 21 Feb 2013 20:18:37 -0500 Subject: [PATCH] xwm: Only call set_fullscreen if the window is mapped If we get a fullscreen client message before we map the window, we don't have a shell surface yet. Just dont call set_fullscreen yet, and rely on xserver_map_shell_surface() to fullscreen it when we map it. --- src/xwayland/window-manager.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/xwayland/window-manager.c b/src/xwayland/window-manager.c index 9af2dd8..9c7638f 100644 --- a/src/xwayland/window-manager.c +++ b/src/xwayland/window-manager.c @@ -1084,9 +1084,11 @@ weston_wm_window_handle_state(struct weston_wm_window *window, if (window->fullscreen) { window->saved_width = window->width; window->saved_height = window->height; - shell_interface->set_fullscreen(window->shsurf, - WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT, - 0, NULL); + + if (window->shsurf) + shell_interface->set_fullscreen(window->shsurf, + WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT, + 0, NULL); } else { shell_interface->set_toplevel(window->shsurf); window->width = window->saved_width; -- 2.7.4