diff --git a/docs/labwc-actions.5.scd b/docs/labwc-actions.5.scd index 287eb28e..4072d151 100644 --- a/docs/labwc-actions.5.scd +++ b/docs/labwc-actions.5.scd @@ -33,6 +33,10 @@ Actions are used in menus and keyboard/mouse bindings. ** Restack the current window below other open windows. +** + Raise the window if it is currently behind any other windows. Lower the + window it is above all other windows. + ** Iconify (minimize) focused window. diff --git a/src/action.c b/src/action.c index cf8b4558..b9f0138f 100644 --- a/src/action.c +++ b/src/action.c @@ -73,6 +73,7 @@ enum action_type { ACTION_TYPE_MOVE, ACTION_TYPE_RAISE, ACTION_TYPE_LOWER, + ACTION_TYPE_RAISELOWER, ACTION_TYPE_RESIZE, ACTION_TYPE_RESIZE_RELATIVE, ACTION_TYPE_MOVETO, @@ -109,6 +110,7 @@ const char *action_names[] = { "Move", "Raise", "Lower", + "RaiseLower", "Resize", "ResizeRelative", "MoveTo", @@ -657,6 +659,15 @@ actions_run(struct view *activator, struct server *server, view_move_to_back(view); } 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: if (view) { interactive_begin(view, LAB_INPUT_STATE_RESIZE,