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:
Thomas Hebb 2020-05-20 21:20:19 -04:00 committed by Simon Ser
parent e3e548a648
commit 84ec8f92a6
8 changed files with 11 additions and 13 deletions

View file

@ -236,7 +236,7 @@ void cursor_update_image(struct sway_cursor *cursor,
static void cursor_hide(struct sway_cursor *cursor) {
wlr_cursor_set_image(cursor->cursor, NULL, 0, 0, 0, 0, 0, 0);
cursor->hidden = true;
wlr_seat_pointer_clear_focus(cursor->seat->wlr_seat);
wlr_seat_pointer_notify_clear_focus(cursor->seat->wlr_seat);
}
static int hide_notify(void *data) {