mirror of
https://github.com/labwc/labwc.git
synced 2025-11-03 09:01:51 -05:00
keyboard: Implement key repeat for keybindings
It seems that every Wayland client is expected to implement its own key-repeat logic, rather than doing it server-side as in X11. This means that labwc also has to implement its own key-repeat logic for compositor keybindings. This is a very simplistic timer-based implementation. It doesn't attempt to synthesize accurate timestamps, and may lag depending on system load, but it appears to get the job done. v2: Use server->wl_event_loop v3: Comments and formatting
This commit is contained in:
parent
b163045fa9
commit
3b55b31070
3 changed files with 62 additions and 5 deletions
|
|
@ -24,6 +24,7 @@ input_device_destroy(struct wl_listener *listener, void *data)
|
|||
struct keyboard *keyboard = (struct keyboard *)input;
|
||||
wl_list_remove(&keyboard->key.link);
|
||||
wl_list_remove(&keyboard->modifier.link);
|
||||
keyboard_cancel_keybind_repeat(keyboard);
|
||||
}
|
||||
free(input);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue