mirror of
https://github.com/swaywm/sway.git
synced 2026-04-21 06:46:22 -04:00
input/keyboard: Skip configure on same config
sway_keyboard_configure does a lot of keyboard setup, including loading the keymap (possibly twice in case of fallback), serializing both old and new keymap to compare them with a strcmp, and updating state that leads to events for all related clients. This function is called a lot - output configuration will call it n_outputs x n_keyboard_devices times. Avoid doing work if the configuration for a particular keyboard has not actually changed.
This commit is contained in:
parent
020a572ed6
commit
48bc984c76
4 changed files with 16 additions and 0 deletions
|
|
@ -189,6 +189,8 @@ struct input_config {
|
|||
|
||||
bool capturable;
|
||||
struct wlr_box region;
|
||||
|
||||
uint64_t seq_id;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -69,6 +69,8 @@ struct sway_keyboard {
|
|||
|
||||
struct wl_event_source *key_repeat_source;
|
||||
struct sway_binding *repeat_binding;
|
||||
|
||||
uint64_t last_input_config;
|
||||
};
|
||||
|
||||
struct sway_keyboard_group {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue