Merge pull request #1054 from swaywm/cancel-grab-on-focus-change

rootston: Cancel existing keyboard grab when changing focus
master
Tony Crisci 7 years ago committed by GitHub
commit 0fa784de0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -825,6 +825,9 @@ void roots_seat_set_focus(struct roots_seat *seat, struct roots_view *view) {
view_activate(view, true); view_activate(view, true);
seat->has_focus = true; seat->has_focus = true;
// An existing keyboard grab might try to deny setting focus, so cancel it
wlr_seat_keyboard_end_grab(seat->seat);
struct wlr_keyboard *keyboard = wlr_seat_get_keyboard(seat->seat); struct wlr_keyboard *keyboard = wlr_seat_get_keyboard(seat->seat);
if (keyboard != NULL) { if (keyboard != NULL) {
wlr_seat_keyboard_notify_enter(seat->seat, view->wlr_surface, wlr_seat_keyboard_notify_enter(seat->seat, view->wlr_surface,

Loading…
Cancel
Save