aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input
diff options
context:
space:
mode:
Diffstat (limited to 'sway/input')
-rw-r--r--sway/input/keyboard.c3
-rw-r--r--sway/input/seat.c5
-rw-r--r--sway/input/switch.c3
3 files changed, 3 insertions, 8 deletions
diff --git a/sway/input/keyboard.c b/sway/input/keyboard.c
index 8927287f..577ec9f5 100644
--- a/sway/input/keyboard.c
+++ b/sway/input/keyboard.c
@@ -405,8 +405,7 @@ static void handle_key_event(struct sway_keyboard *keyboard,
405 char *device_identifier = input_device_get_identifier(wlr_device); 405 char *device_identifier = input_device_get_identifier(wlr_device);
406 bool exact_identifier = keyboard->wlr->group != NULL; 406 bool exact_identifier = keyboard->wlr->group != NULL;
407 seat_idle_notify_activity(seat, IDLE_SOURCE_KEYBOARD); 407 seat_idle_notify_activity(seat, IDLE_SOURCE_KEYBOARD);
408 bool input_inhibited = seat->exclusive_client != NULL || 408 bool input_inhibited = server.session_lock.locked;
409 server.session_lock.locked;
410 struct sway_keyboard_shortcuts_inhibitor *sway_inhibitor = 409 struct sway_keyboard_shortcuts_inhibitor *sway_inhibitor =
411 keyboard_shortcuts_inhibitor_get_for_focused_surface(seat); 410 keyboard_shortcuts_inhibitor_get_for_focused_surface(seat);
412 bool shortcuts_inhibited = sway_inhibitor && sway_inhibitor->inhibitor->active; 411 bool shortcuts_inhibited = sway_inhibitor && sway_inhibitor->inhibitor->active;
diff --git a/sway/input/seat.c b/sway/input/seat.c
index 0fd0e8e6..3ef0d713 100644
--- a/sway/input/seat.c
+++ b/sway/input/seat.c
@@ -1104,8 +1104,7 @@ bool seat_is_input_allowed(struct sway_seat *seat,
1104 } 1104 }
1105 return false; 1105 return false;
1106 } 1106 }
1107 struct wl_client *client = wl_resource_get_client(surface->resource); 1107 return true;
1108 return seat->exclusive_client == client || seat->exclusive_client == NULL;
1109} 1108}
1110 1109
1111static void send_unfocus(struct sway_container *con, void *data) { 1110static void send_unfocus(struct sway_container *con, void *data) {
@@ -1373,7 +1372,6 @@ void seat_set_focus_layer(struct sway_seat *seat,
1373void seat_set_exclusive_client(struct sway_seat *seat, 1372void seat_set_exclusive_client(struct sway_seat *seat,
1374 struct wl_client *client) { 1373 struct wl_client *client) {
1375 if (!client) { 1374 if (!client) {
1376 seat->exclusive_client = client;
1377 // Triggers a refocus of the topmost surface layer if necessary 1375 // Triggers a refocus of the topmost surface layer if necessary
1378 // TODO: Make layer surface focus per-output based on cursor position 1376 // TODO: Make layer surface focus per-output based on cursor position
1379 for (int i = 0; i < root->outputs->length; ++i) { 1377 for (int i = 0; i < root->outputs->length; ++i) {
@@ -1408,7 +1406,6 @@ void seat_set_exclusive_client(struct sway_seat *seat,
1408 now.tv_nsec / 1000, point->touch_id); 1406 now.tv_nsec / 1000, point->touch_id);
1409 } 1407 }
1410 } 1408 }
1411 seat->exclusive_client = client;
1412} 1409}
1413 1410
1414struct sway_node *seat_get_focus_inactive(struct sway_seat *seat, 1411struct sway_node *seat_get_focus_inactive(struct sway_seat *seat,
diff --git a/sway/input/switch.c b/sway/input/switch.c
index 7a539801..32d9c7e0 100644
--- a/sway/input/switch.c
+++ b/sway/input/switch.c
@@ -34,8 +34,7 @@ static bool sway_switch_trigger_test(enum sway_switch_trigger trigger,
34 34
35static void execute_binding(struct sway_switch *sway_switch) { 35static void execute_binding(struct sway_switch *sway_switch) {
36 struct sway_seat* seat = sway_switch->seat_device->sway_seat; 36 struct sway_seat* seat = sway_switch->seat_device->sway_seat;
37 bool input_inhibited = seat->exclusive_client != NULL || 37 bool input_inhibited = server.session_lock.locked;
38 server.session_lock.locked;
39 38
40 list_t *bindings = config->current_mode->switch_bindings; 39 list_t *bindings = config->current_mode->switch_bindings;
41 struct sway_switch_binding *matched_binding = NULL; 40 struct sway_switch_binding *matched_binding = NULL;