summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2012-05-29 15:35:29 -0400
committerKristian Høgsberg <krh@bitplanet.net>2012-05-29 15:35:29 -0400
commitc9571fbd3aae7d73ef68d4c578b2767ffdbf85d5 (patch)
tree16b6a2e47bac3179799c9b0b22b96e107184232c
parent053be42a4ed4910e5d1f4c89c94a8d04da4842b9 (diff)
xwm: Reset wm->focus_window when the focused window is destroyed
-rw-r--r--src/xwayland/window-manager.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/xwayland/window-manager.c b/src/xwayland/window-manager.c
index 334b584..dbab20f 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);
}