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
(cherry picked from commit 1e3ef88bd5
)
This commit is contained in:
@ -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);
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user