diff options
author | frsfnrrg <frsfnrrg@users.noreply.github.com> | 2018-06-01 17:56:13 -0400 |
---|---|---|
committer | frsfnrrg <frsfnrrg@users.noreply.github.com> | 2018-06-01 18:52:36 -0400 |
commit | 480f0c593cc99a1a77b8b26027f2c9e065fb790c (patch) | |
tree | 3adde99c8960c4d6ef5e7f8109cc584ca5efb909 | |
parent | Comment to explain sway_shortcut_state lists (diff) | |
download | sway-480f0c593cc99a1a77b8b26027f2c9e065fb790c.tar.gz sway-480f0c593cc99a1a77b8b26027f2c9e065fb790c.tar.zst sway-480f0c593cc99a1a77b8b26027f2c9e065fb790c.zip |
Rename update_shortcut_model to update_shortcut_state
-rw-r--r-- | sway/input/keyboard.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c index b7c622aa..71737cc4 100644 --- a/sway/input/keyboard.c +++ b/sway/input/keyboard.c | |||
@@ -12,7 +12,7 @@ | |||
12 | /** | 12 | /** |
13 | * Update the shortcut model state in response to new input | 13 | * Update the shortcut model state in response to new input |
14 | */ | 14 | */ |
15 | static void update_shortcut_model(struct sway_shortcut_state *state, | 15 | static void update_shortcut_state(struct sway_shortcut_state *state, |
16 | struct wlr_event_keyboard_key *event, uint32_t new_key, | 16 | struct wlr_event_keyboard_key *event, uint32_t new_key, |
17 | bool last_key_was_a_modifier) { | 17 | bool last_key_was_a_modifier) { |
18 | if (event->state == WLR_KEY_PRESSED) { | 18 | if (event->state == WLR_KEY_PRESSED) { |
@@ -213,16 +213,16 @@ static void handle_keyboard_key(struct wl_listener *listener, void *data) { | |||
213 | bool last_key_was_a_modifier = code_modifiers != keyboard->last_modifiers; | 213 | bool last_key_was_a_modifier = code_modifiers != keyboard->last_modifiers; |
214 | keyboard->last_modifiers = code_modifiers; | 214 | keyboard->last_modifiers = code_modifiers; |
215 | 215 | ||
216 | // Update shortcut models | 216 | // Update shortcut model state |
217 | update_shortcut_model(&keyboard->state_keycodes, event, | 217 | update_shortcut_state(&keyboard->state_keycodes, event, |
218 | (uint32_t)keycode, last_key_was_a_modifier); | 218 | (uint32_t)keycode, last_key_was_a_modifier); |
219 | for (size_t i = 0; i < translated_keysyms_len; ++i) { | 219 | for (size_t i = 0; i < translated_keysyms_len; ++i) { |
220 | update_shortcut_model(&keyboard->state_keysyms_translated, | 220 | update_shortcut_state(&keyboard->state_keysyms_translated, |
221 | event, (uint32_t)translated_keysyms[i], | 221 | event, (uint32_t)translated_keysyms[i], |
222 | last_key_was_a_modifier); | 222 | last_key_was_a_modifier); |
223 | } | 223 | } |
224 | for (size_t i = 0; i < raw_keysyms_len; ++i) { | 224 | for (size_t i = 0; i < raw_keysyms_len; ++i) { |
225 | update_shortcut_model(&keyboard->state_keysyms_raw, | 225 | update_shortcut_state(&keyboard->state_keysyms_raw, |
226 | event, (uint32_t)raw_keysyms[i], | 226 | event, (uint32_t)raw_keysyms[i], |
227 | last_key_was_a_modifier); | 227 | last_key_was_a_modifier); |
228 | } | 228 | } |