mirror of
https://gitlab.freedesktop.org/wayland/weston.git
synced 2026-05-06 16:08:27 +02:00
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:
parent
681f9f4149
commit
ae6e2717c5
1 changed files with 3 additions and 0 deletions
|
|
@ -974,6 +974,9 @@ window_destroy(struct window *window)
|
|||
input->pointer_focus = NULL;
|
||||
if (input->keyboard_focus == window)
|
||||
input->keyboard_focus = NULL;
|
||||
if (input->focus_widget &&
|
||||
input->focus_widget->window == window)
|
||||
input->focus_widget = NULL;
|
||||
}
|
||||
|
||||
if (window->frame)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue