]> git.mdlowis.com Git - proto/labwc.git/commitdiff
key-state: rename function for consistency
authorJohan Malm <jgm323@gmail.com>
Sat, 30 Sep 2023 08:19:59 +0000 (09:19 +0100)
committerConsolatis <35009135+Consolatis@users.noreply.github.com>
Sat, 30 Sep 2023 13:43:59 +0000 (15:43 +0200)
...with the equivalent function that returns the number of pressed keys.

s/key_state_nr_keys/key_state_nr_bound_keys/

include/key-state.h
src/key-state.c
src/keyboard.c

index fd029881bb93fd553db3a684967095d5e31b803b..71a3eb63f7481f1d96e0c7a6d128d51c61d62d3a 100644 (file)
@@ -20,7 +20,7 @@ void key_state_set_pressed(uint32_t keycode, bool ispressed);
 void key_state_store_pressed_keys_as_bound(void);
 bool key_state_corresponding_press_event_was_bound(uint32_t keycode);
 void key_state_bound_key_remove(uint32_t keycode);
-int key_state_nr_keys(void);
+int key_state_nr_bound_keys(void);
 int key_state_nr_pressed_keys(void);
 
 #endif /* LABWC_KEY_STATE_H */
index 06e193a74ce8155466825128dc4ae1ac147cab31..945ea6c672abb422bab6a0b0994d0ed7c4ae723b 100644 (file)
@@ -98,7 +98,7 @@ key_state_bound_key_remove(uint32_t keycode)
 }
 
 int
-key_state_nr_keys(void)
+key_state_nr_bound_keys(void)
 {
        return bound.nr_keys;
 }
index e738afa33a39c0d2d23b2fef8f9b34f91b70b123..da25b79809bbdf990ff406eb279f805c46696033 100644 (file)
@@ -68,7 +68,7 @@ keyboard_modifiers_notify(struct wl_listener *listener, void *data)
                        || seat->workspace_osd_shown_by_modifier) {
                if (!keyboard_any_modifiers_pressed(wlr_keyboard))  {
                        if (server->osd_state.cycle_view) {
-                               if (key_state_nr_keys()) {
+                               if (key_state_nr_bound_keys()) {
                                        should_cancel_cycling_on_next_key_release = true;
                                } else {
                                        end_cycling(server);