mirror of
https://github.com/labwc/labwc.git
synced 2026-06-14 14:33:17 -04:00
add action.immediate and use it instead of osd.show
This commit is contained in:
parent
bfea2d2191
commit
657096f419
2 changed files with 9 additions and 1 deletions
|
|
@ -145,6 +145,10 @@ Actions are used in menus and keyboard/mouse bindings.
|
||||||
This determines whether to cycle through all windows or only windows of the
|
This determines whether to cycle through all windows or only windows of the
|
||||||
same application as the currently focused window. Default is "all".
|
same application as the currently focused window. Default is "all".
|
||||||
|
|
||||||
|
*immediate* [yes|no]
|
||||||
|
This determines whether the switch happens immediately, useful when bound to
|
||||||
|
a key without modifier. Default is "no".
|
||||||
|
|
||||||
*<action name="Reconfigure" />*
|
*<action name="Reconfigure" />*
|
||||||
Re-load configuration and theme files.
|
Re-load configuration and theme files.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -372,6 +372,10 @@ action_arg_from_xml_node(struct action *action, const char *nodename, const char
|
||||||
}
|
}
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
if (!strcasecmp(argument, "immediate")) {
|
||||||
|
action_arg_add_bool(action, argument, parse_bool(content, false));
|
||||||
|
goto cleanup;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case ACTION_TYPE_SHOW_MENU:
|
case ACTION_TYPE_SHOW_MENU:
|
||||||
if (!strcmp(argument, "menu")) {
|
if (!strcmp(argument, "menu")) {
|
||||||
|
|
@ -1143,7 +1147,7 @@ run_action(struct view *view, struct action *action,
|
||||||
cycle_step(dir);
|
cycle_step(dir);
|
||||||
} else {
|
} else {
|
||||||
cycle_begin(dir, filter);
|
cycle_begin(dir, filter);
|
||||||
if (!rc.window_switcher.osd.show) {
|
if (action_get_bool(action, "immediate", false)) {
|
||||||
cycle_finish(true);
|
cycle_finish(true);
|
||||||
if (view && dir == LAB_CYCLE_DIR_FORWARD) {
|
if (view && dir == LAB_CYCLE_DIR_FORWARD) {
|
||||||
view_move_to_back(view);
|
view_move_to_back(view);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue