window: Don't crash when window with focus_widget is destroyed
We would try to deliver a leave event to a widget in a destroyed window.
This commit is contained in:
@@ -974,6 +974,9 @@ window_destroy(struct window *window)
|
|||||||
input->pointer_focus = NULL;
|
input->pointer_focus = NULL;
|
||||||
if (input->keyboard_focus == window)
|
if (input->keyboard_focus == window)
|
||||||
input->keyboard_focus = NULL;
|
input->keyboard_focus = NULL;
|
||||||
|
if (input->focus_widget &&
|
||||||
|
input->focus_widget->window == window)
|
||||||
|
input->focus_widget = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (window->frame)
|
if (window->frame)
|
||||||
|
|||||||
Reference in New Issue
Block a user