desktop-shell: Clear out missing listeners

The keyboard focus listener, caps changed and pointer focus listener
were missing when destroying the seat. These are necessary to avoid
using weston_desktop object even if it was destroyed, which happens due
to a focus out event and ultimately handled by the keyboard focus notify
callback.

Once the seats are destroyed (and implictly the focus handlers) we're
safe to destroy weston_desktop object as well.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
dev
Marius Vlad 3 years ago committed by Pekka Paalanen
parent c114fd6ef6
commit a7392c855d
  1. 3
      desktop-shell/shell.c

@ -2256,6 +2256,9 @@ get_focused_output(struct weston_compositor *compositor)
static void
desktop_shell_destroy_seat(struct shell_seat *shseat)
{
wl_list_remove(&shseat->keyboard_focus_listener.link);
wl_list_remove(&shseat->caps_changed_listener.link);
wl_list_remove(&shseat->pointer_focus_listener.link);
wl_list_remove(&shseat->seat_destroy_listener.link);
wl_list_remove(&shseat->link);

Loading…
Cancel
Save