From c9571fbd3aae7d73ef68d4c578b2767ffdbf85d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Tue, 29 May 2012 15:35:29 -0400 Subject: [PATCH] xwm: Reset wm->focus_window when the focused window is destroyed --- src/xwayland/window-manager.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/xwayland/window-manager.c b/src/xwayland/window-manager.c index 334b5842..dbab20f5 100644 --- a/src/xwayland/window-manager.c +++ b/src/xwayland/window-manager.c @@ -740,6 +740,9 @@ weston_wm_handle_destroy_notify(struct weston_wm *wm, xcb_generic_event_t *event xcb_destroy_window(wm->conn, window->frame_id); if (window->surface) wl_list_remove(&window->surface_destroy_listener.link); + if (wm->focus_window == window) + wm->focus_window = NULL; + free(window); }