Add overrideInhibition to keyboard.keybind
Some checks failed
labwc.github.io / notify (push) Has been cancelled

This commit is contained in:
Yannis Drougas 2025-04-09 08:26:59 +01:00 committed by Johan Malm
parent 4c7a9960a4
commit c5ea41e876
4 changed files with 15 additions and 3 deletions

View file

@ -602,6 +602,7 @@ fill_keybind(xmlNode *node)
lab_xml_get_bool(node, "onRelease", &keybind->on_release);
lab_xml_get_bool(node, "layoutDependent", &keybind->use_syms_only);
lab_xml_get_bool(node, "allowWhenLocked", &keybind->allow_when_locked);
lab_xml_get_bool(node, "overrideInhibition", &keybind->override_inhibition);
append_parsed_actions(node, &keybind->actions);
}
@ -1706,6 +1707,8 @@ deduplicate_key_bindings(void)
wl_list_remove(&current->link);
keybind_destroy(current);
cleared++;
} else if (actions_contain_toggle_keybinds(&current->actions)) {
current->override_inhibition = true;
}
}
if (replaced) {

View file

@ -203,8 +203,10 @@ match_keybinding_for_sym(uint32_t modifiers,
if (modifiers ^ keybind->modifiers) {
continue;
}
if (view_inhibits_actions(server.active_view, &keybind->actions)) {
continue;
if (!(keybind->override_inhibition)) {
if (view_inhibits_actions(server.active_view, &keybind->actions)) {
continue;
}
}
if (sym == XKB_KEY_NoSymbol) {
/* Use keycodes */