Do not attempt to set keyboard focus to a surface that has no wl_resource. The destroy listener hangs off the wl_resource, so if that is not present, nothing will clean up the pointer when the weston_surface gets destroyed and it goes stale. As keyboard_focus_resource_destroyed() sets the focus to NULL, this patch should be enough to guarantee that the keyboard focus surface will always have a wl_resource. I have confirmed the added branch in weston_keyboard_set_focus() can be hit, but doing so is hard. My test case has weston/x11 with two outputs, and weston/wayland --sprawl running on top of that, then closing the parent compositor output windows one by one. Sometimes it hits, often it does not. Having the window closing animation enabled may help to hit it. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Daniel Stone <daniels@collabora.com>dev
parent
8d6e14c991
commit
72e183bd2b
Loading…
Reference in new issue