cursor: Fix out-of-surface movement for unmanaged surfaces

This commit is contained in:
John Lindgren 2022-09-01 17:50:28 -04:00 committed by Consolatis
parent f7b1bc1de8
commit 7c6c018f43
6 changed files with 57 additions and 36 deletions

View file

@ -57,6 +57,8 @@ unmanaged_handle_unmap(struct wl_listener *listener, void *data)
struct xwayland_unmanaged *unmanaged =
wl_container_of(listener, unmanaged, unmap);
struct wlr_xwayland_surface *xsurface = unmanaged->xwayland_surface;
struct seat *seat = &unmanaged->server->seat;
wl_list_remove(&unmanaged->link);
wl_list_remove(&unmanaged->set_geometry.link);
@ -64,9 +66,11 @@ unmanaged_handle_unmap(struct wl_listener *listener, void *data)
* Mark the node as gone so a racing configure event
* won't try to reposition the node while unmapped.
*/
if (unmanaged->node && seat->pressed.node == unmanaged->node) {
seat_reset_pressed(seat);
}
unmanaged->node = NULL;
struct seat *seat = &unmanaged->server->seat;
if (seat->seat->keyboard_state.focused_surface == xsurface->surface) {
/*
* Try to focus on parent surface