aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar llyyr <llyyr.public@gmail.com>2024-05-25 22:30:20 +0530
committerLibravatar Simon Ser <contact@emersion.fr>2024-07-03 08:41:46 +0200
commit0386b2afcb88f0ceba144c1f2bbb4b6fc6f13518 (patch)
treed0716465ecc63fac126cc8c8c8502e2aeeecbc48
parentinput/keyboard: don't send key release if we don't have focused surface (diff)
downloadsway-0386b2afcb88f0ceba144c1f2bbb4b6fc6f13518.tar.gz
sway-0386b2afcb88f0ceba144c1f2bbb4b6fc6f13518.tar.zst
sway-0386b2afcb88f0ceba144c1f2bbb4b6fc6f13518.zip
input/seat: don't send redundant leave/enter on device creation
Fixes: #8143 #8173 Upstream issue: https://github.com/fcitx/fcitx5/issues/1044
-rw-r--r--sway/input/seat.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sway/input/seat.c b/sway/input/seat.c
index da4bb12a..9a00a3e2 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -802,11 +802,10 @@ static void seat_configure_keyboard(struct sway_seat *seat,
802 return; 802 return;
803 } 803 }
804 804
805 // force notify reenter to pick up the new configuration. This reuses 805 // Notify reenter to pick up the new configuration. This reuses
806 // the current focused surface to avoid breaking input grabs. 806 // the current focused surface to avoid breaking input grabs.
807 struct wlr_surface *surface = seat->wlr_seat->keyboard_state.focused_surface; 807 struct wlr_surface *surface = seat->wlr_seat->keyboard_state.focused_surface;
808 if (surface) { 808 if (surface) {
809 wlr_seat_keyboard_notify_clear_focus(seat->wlr_seat);
810 seat_keyboard_notify_enter(seat, surface); 809 seat_keyboard_notify_enter(seat, surface);
811 } 810 }
812} 811}