aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/input-manager.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/input/input-manager.c')
-rw-r--r--sway/input/input-manager.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/sway/input/input-manager.c b/sway/input/input-manager.c
index af0f5afa..124d57dc 100644
--- a/sway/input/input-manager.c
+++ b/sway/input/input-manager.c
@@ -333,6 +333,26 @@ static void handle_keyboard_shortcuts_inhibit_new_inhibitor(
333 struct sway_seat *seat = inhibitor->seat->data; 333 struct sway_seat *seat = inhibitor->seat->data;
334 wl_list_insert(&seat->keyboard_shortcuts_inhibitors, &sway_inhibitor->link); 334 wl_list_insert(&seat->keyboard_shortcuts_inhibitors, &sway_inhibitor->link);
335 335
336 struct seat_config *config = seat_get_config(seat);
337 if (!config) {
338 config = seat_get_config_by_name("*");
339 }
340
341 if (config && config->shortcuts_inhibit == SHORTCUTS_INHIBIT_DISABLE) {
342 /**
343 * Here we deny to honour the inhibitor by never sending the
344 * activate signal. We can not, however, destroy the inhibitor
345 * because the protocol doesn't allow for it. So it will linger
346 * until the client removes it im- or explicitly. But at least
347 * it can only be one inhibitor per surface and seat at a time.
348 *
349 * We also want to allow the user to activate the inhibitor
350 * manually later which is why we do this check here where the
351 * inhibitor is already attached to its seat and ready for use.
352 */
353 return;
354 }
355
336 wlr_keyboard_shortcuts_inhibitor_v1_activate(inhibitor); 356 wlr_keyboard_shortcuts_inhibitor_v1_activate(inhibitor);
337} 357}
338 358