diff options
author | Marius Vlad <marius.vlad@collabora.com> | 2022-08-30 20:26:28 +0300 |
---|---|---|
committer | Marius Vlad <marius.vlad@collabora.com> | 2022-09-02 15:45:13 +0300 |
commit | 1aa935e6d81603505701bb8bb97e1e4fee589721 (patch) | |
tree | c0055523628a1c932b9c56ed5cca430c8c888fc7 /libweston | |
parent | d6ab6da9887353056962343d9dcbfb9610ac889b (diff) | |
download | weston-1aa935e6d81603505701bb8bb97e1e4fee589721.tar.gz |
libweston/input: Assert if we're still having a notify listener installed
Tracking correctly previous events shouldn't corrupt the surface destroy
signal list. This enforces that by ensuring that we wouldn't have
a .notify wl_listener still being set (which shouldn't happen if we do
eventually get a focus_in event that clears it out).
Suggested-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Diffstat (limited to 'libweston')
-rw-r--r-- | libweston/input.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libweston/input.c b/libweston/input.c index ead4b79e..6cbb8db0 100644 --- a/libweston/input.c +++ b/libweston/input.c @@ -2329,6 +2329,7 @@ notify_keyboard_focus_out(struct weston_seat *seat) if (focus) { seat->use_saved_kbd_focus = true; seat->saved_kbd_focus = focus; + assert(seat->saved_kbd_focus_listener.notify == NULL); seat->saved_kbd_focus_listener.notify = destroy_device_saved_kbd_focus; wl_signal_add(&focus->destroy_signal, |