xwm: Reset wm->focus_window when the focused window is destroyed

This commit is contained in:
Kristian Høgsberg 2012-05-29 15:35:29 -04:00
parent 053be42a4e
commit c9571fbd3a
1 changed files with 3 additions and 0 deletions

View File

@ -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);
}