mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
seat: Only resend keyboard/pointer enter to focused clients
Otherwise it will send enter events to clients that already have keyboard/pointer focus. Notably Qt applications warns about this.
This commit is contained in:
parent
1c3e0816f3
commit
31914928d2
2 changed files with 2 additions and 2 deletions
|
@ -415,7 +415,7 @@ void seat_client_create_keyboard(struct wlr_seat_client *seat_client,
|
|||
seat_client->seat->keyboard_state.focused_surface;
|
||||
|
||||
// Send an enter event if there is a focused client/surface stored
|
||||
if (focused_client != NULL && focused_surface != NULL) {
|
||||
if (focused_client == seat_client && focused_surface != NULL) {
|
||||
uint32_t *keycodes = keyboard->keycodes;
|
||||
size_t num_keycodes = keyboard->num_keycodes;
|
||||
|
||||
|
|
|
@ -446,7 +446,7 @@ void seat_client_create_pointer(struct wlr_seat_client *seat_client,
|
|||
seat_client->seat->pointer_state.focused_surface;
|
||||
|
||||
// Send an enter event if there is a focused client/surface stored
|
||||
if (focused_client != NULL && focused_surface != NULL) {
|
||||
if (focused_client == seat_client && focused_surface != NULL) {
|
||||
double sx = seat_client->seat->pointer_state.sx;
|
||||
double sy = seat_client->seat->pointer_state.sy;
|
||||
|
||||
|
|
Loading…
Reference in a new issue