diff options
Diffstat (limited to 'sway/input/switch.c')
-rw-r--r-- | sway/input/switch.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sway/input/switch.c b/sway/input/switch.c index fc7dfaff..831f4dbf 100644 --- a/sway/input/switch.c +++ b/sway/input/switch.c | |||
@@ -1,6 +1,5 @@ | |||
1 | #include "sway/config.h" | 1 | #include "sway/config.h" |
2 | #include "sway/input/switch.h" | 2 | #include "sway/input/switch.h" |
3 | #include <wlr/types/wlr_idle.h> | ||
4 | #include "log.h" | 3 | #include "log.h" |
5 | 4 | ||
6 | struct sway_switch *sway_switch_create(struct sway_seat *seat, | 5 | struct sway_switch *sway_switch_create(struct sway_seat *seat, |
@@ -34,9 +33,8 @@ static bool sway_switch_trigger_test(enum sway_switch_trigger trigger, | |||
34 | } | 33 | } |
35 | 34 | ||
36 | static void execute_binding(struct sway_switch *sway_switch) { | 35 | static void execute_binding(struct sway_switch *sway_switch) { |
37 | struct sway_seat* seat = sway_switch->seat_device->sway_seat; | 36 | struct sway_seat *seat = sway_switch->seat_device->sway_seat; |
38 | bool input_inhibited = seat->exclusive_client != NULL || | 37 | bool locked = server.session_lock.lock; |
39 | server.session_lock.locked; | ||
40 | 38 | ||
41 | list_t *bindings = config->current_mode->switch_bindings; | 39 | list_t *bindings = config->current_mode->switch_bindings; |
42 | struct sway_switch_binding *matched_binding = NULL; | 40 | struct sway_switch_binding *matched_binding = NULL; |
@@ -53,13 +51,13 @@ static void execute_binding(struct sway_switch *sway_switch) { | |||
53 | continue; | 51 | continue; |
54 | } | 52 | } |
55 | bool binding_locked = binding->flags & BINDING_LOCKED; | 53 | bool binding_locked = binding->flags & BINDING_LOCKED; |
56 | if (!binding_locked && input_inhibited) { | 54 | if (!binding_locked && locked) { |
57 | continue; | 55 | continue; |
58 | } | 56 | } |
59 | 57 | ||
60 | matched_binding = binding; | 58 | matched_binding = binding; |
61 | 59 | ||
62 | if (binding_locked == input_inhibited) { | 60 | if (binding_locked == locked) { |
63 | break; | 61 | break; |
64 | } | 62 | } |
65 | } | 63 | } |