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>
dev
Marius Vlad 2 years ago
parent d6ab6da988
commit 1aa935e6d8
  1. 1
      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,

Loading…
Cancel
Save