git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commit1f44d12ce898ef0220c1968799a42973b1a758e0
parent825f1c569e
authorIsaac Freund <[email protected]>
date2024-05-12 09:58
Keyboard: fix redundant leave/enter on creation

Currently if a second keyboard input device is created river will send
a wl_keyboard.leave event immediately followed by a wl_keyboard.enter
event. This serves no purpose and can confuse clients, in particular due
to fctix creating/destroying virtual keyboards on focus change.

Fixes: https://codeberg.org/river/river/issues/1062
References: https://github.com/fcitx/fcitx5/issues/1044

 river/Seat.zig | 1 -
 1 file changed, 1 deletion(-)

diff --git a/river/Seat.zig b/river/Seat.zig
index 8751aa7..6fc7c65 100644
--- a/river/Seat.zig
+++ b/river/Seat.zig
@@ -489,7 +489,6 @@ fn tryAddDevice(seat: *Seat, wlr_device: *wlr.InputDevice) !void {
 
             seat.wlr_seat.setKeyboard(keyboard.device.wlr_device.toKeyboard());
             if (seat.wlr_seat.keyboard_state.focused_surface) |wlr_surface| {
-                seat.wlr_seat.keyboardNotifyClearFocus();
                 seat.keyboardNotifyEnter(wlr_surface);
             }
         },