Skip to content

Commit

Permalink
Keyboard: fix redundant leave/enter on creation
Browse files Browse the repository at this point in the history
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: fcitx/fcitx5#1044
  • Loading branch information
ifreund committed May 12, 2024
1 parent f66eec9 commit 1e3ef88
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion river/Seat.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
},
Expand Down

0 comments on commit 1e3ef88

Please sign in to comment.