mirror of
https://github.com/swaywm/sway.git
synced 2026-04-22 06:46:27 -04:00
Use new wlroots API for clearing keyboard/pointer focus during grabs
We are not allowed to do what we did in #5222 and pass a `NULL` surface wlr_seat_pointer_notify_enter(), and it's causing crashes when an xdg-shell popup is active (see #5294 and swaywm/wlroots#2161). Instead, solve #5220 using the new wlroots API introduced in swaywm/wlroots#2217.
This commit is contained in:
parent
e3e548a648
commit
84ec8f92a6
8 changed files with 11 additions and 13 deletions
|
|
@ -483,8 +483,7 @@ static void handle_pointer_motion(struct sway_seat *seat, uint32_t time_msec,
|
|||
}
|
||||
} else {
|
||||
cursor_update_image(cursor, node);
|
||||
wlr_seat_pointer_notify_enter(seat->wlr_seat, NULL, 0, 0);
|
||||
wlr_seat_pointer_clear_focus(seat->wlr_seat);
|
||||
wlr_seat_pointer_notify_clear_focus(seat->wlr_seat);
|
||||
}
|
||||
|
||||
struct sway_drag_icon *drag_icon;
|
||||
|
|
@ -664,8 +663,7 @@ static void handle_rebase(struct sway_seat *seat, uint32_t time_msec) {
|
|||
}
|
||||
} else {
|
||||
cursor_update_image(cursor, e->previous_node);
|
||||
wlr_seat_pointer_notify_enter(seat->wlr_seat, NULL, 0, 0);
|
||||
wlr_seat_pointer_clear_focus(seat->wlr_seat);
|
||||
wlr_seat_pointer_notify_clear_focus(seat->wlr_seat);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue