mirror of
https://codeberg.org/dwl/dwl.git
synced 2026-02-21 01:40:12 -05:00
fix some key binding events being passed to clients
This commit is contained in:
parent
41be906af3
commit
c54fa34024
2 changed files with 20 additions and 12 deletions
15
client.h
15
client.h
|
|
@ -294,11 +294,18 @@ client_is_unmanaged(Client *c)
|
|||
static inline void
|
||||
client_notify_enter(struct wlr_surface *s, struct wlr_keyboard *kb)
|
||||
{
|
||||
if (kb)
|
||||
wlr_seat_keyboard_notify_enter(seat, s, kb->keycodes,
|
||||
kb->num_keycodes, &kb->modifiers);
|
||||
else
|
||||
uint32_t filtered[WLR_KEYBOARD_KEYS_CAP];
|
||||
size_t size = 0;
|
||||
if (!kb) {
|
||||
wlr_seat_keyboard_notify_enter(seat, s, NULL, 0, NULL);
|
||||
return;
|
||||
}
|
||||
for (size_t i = 0; i < kb->num_keycodes; i++) {
|
||||
uint32_t key = kb->keycodes[i];
|
||||
if (!consumed[key])
|
||||
filtered[size++] = key;
|
||||
}
|
||||
wlr_seat_keyboard_notify_enter(seat, s, filtered, size, &kb->modifiers);
|
||||
}
|
||||
|
||||
static inline void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue