mirror of
https://github.com/labwc/labwc.git
synced 2026-04-12 08:21:13 -04:00
Add RaiseLower action
This commit is contained in:
parent
e5aef03319
commit
b6aa0ce9b0
2 changed files with 15 additions and 0 deletions
|
|
@ -33,6 +33,10 @@ Actions are used in menus and keyboard/mouse bindings.
|
||||||
*<action name="Lower" />*
|
*<action name="Lower" />*
|
||||||
Restack the current window below other open windows.
|
Restack the current window below other open windows.
|
||||||
|
|
||||||
|
*<action name="RaiseLower" />*
|
||||||
|
Raise the window if it is currently behind any other windows. Lower the
|
||||||
|
window it is above all other windows.
|
||||||
|
|
||||||
*<action name="Iconify" />*
|
*<action name="Iconify" />*
|
||||||
Iconify (minimize) focused window.
|
Iconify (minimize) focused window.
|
||||||
|
|
||||||
|
|
|
||||||
11
src/action.c
11
src/action.c
|
|
@ -73,6 +73,7 @@ enum action_type {
|
||||||
ACTION_TYPE_MOVE,
|
ACTION_TYPE_MOVE,
|
||||||
ACTION_TYPE_RAISE,
|
ACTION_TYPE_RAISE,
|
||||||
ACTION_TYPE_LOWER,
|
ACTION_TYPE_LOWER,
|
||||||
|
ACTION_TYPE_RAISELOWER,
|
||||||
ACTION_TYPE_RESIZE,
|
ACTION_TYPE_RESIZE,
|
||||||
ACTION_TYPE_RESIZE_RELATIVE,
|
ACTION_TYPE_RESIZE_RELATIVE,
|
||||||
ACTION_TYPE_MOVETO,
|
ACTION_TYPE_MOVETO,
|
||||||
|
|
@ -109,6 +110,7 @@ const char *action_names[] = {
|
||||||
"Move",
|
"Move",
|
||||||
"Raise",
|
"Raise",
|
||||||
"Lower",
|
"Lower",
|
||||||
|
"RaiseLower",
|
||||||
"Resize",
|
"Resize",
|
||||||
"ResizeRelative",
|
"ResizeRelative",
|
||||||
"MoveTo",
|
"MoveTo",
|
||||||
|
|
@ -657,6 +659,15 @@ actions_run(struct view *activator, struct server *server,
|
||||||
view_move_to_back(view);
|
view_move_to_back(view);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case ACTION_TYPE_RAISELOWER:
|
||||||
|
if (view) {
|
||||||
|
if (view == view->server->focused_view) {
|
||||||
|
view_move_to_back(view);
|
||||||
|
} else {
|
||||||
|
view_move_to_front(view);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
case ACTION_TYPE_RESIZE:
|
case ACTION_TYPE_RESIZE:
|
||||||
if (view) {
|
if (view) {
|
||||||
interactive_begin(view, LAB_INPUT_STATE_RESIZE,
|
interactive_begin(view, LAB_INPUT_STATE_RESIZE,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue