diff options
Diffstat (limited to 'sway/input')
-rw-r--r-- | sway/input/input-manager.c | 20 |
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( struct sway_seat *seat = inhibitor->seat->data; wl_list_insert(&seat->keyboard_shortcuts_inhibitors, &sway_inhibitor->link); + struct seat_config *config = seat_get_config(seat); + if (!config) { + config = seat_get_config_by_name("*"); + } + + if (config && config->shortcuts_inhibit == SHORTCUTS_INHIBIT_DISABLE) { + /** + * Here we deny to honour the inhibitor by never sending the + * activate signal. We can not, however, destroy the inhibitor + * because the protocol doesn't allow for it. So it will linger + * until the client removes it im- or explicitly. But at least + * it can only be one inhibitor per surface and seat at a time. + * + * We also want to allow the user to activate the inhibitor + * manually later which is why we do this check here where the + * inhibitor is already attached to its seat and ready for use. + */ + return; + } + wlr_keyboard_shortcuts_inhibitor_v1_activate(inhibitor); } |