mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
parent
21f079e306
commit
b1b48537a1
2 changed files with 17 additions and 1 deletions
|
|
@ -150,7 +150,12 @@ Actions are used in menus and keyboard/mouse bindings.
|
|||
"both" (default), "horizontal", and "vertical".
|
||||
|
||||
*<action name="Maximize" direction="value" />*
|
||||
Maximize focused window. Supported directions are "both" (default),
|
||||
Maximize focused window in the direction(s) specified. Supported
|
||||
directions are "both" (default), "horizontal", and "vertical".
|
||||
|
||||
*<action name="UnMaximize" direction="value" />*
|
||||
Unmaximize focused window in the direction(s) specified and return it to
|
||||
its pre-maximized dimensions. Supported directions are "both" (default),
|
||||
"horizontal", and "vertical".
|
||||
|
||||
*<action name="ToggleAlwaysOnTop" />*
|
||||
|
|
|
|||
11
src/action.c
11
src/action.c
|
|
@ -78,6 +78,7 @@ enum action_type {
|
|||
ACTION_TYPE_SHOW_MENU,
|
||||
ACTION_TYPE_TOGGLE_MAXIMIZE,
|
||||
ACTION_TYPE_MAXIMIZE,
|
||||
ACTION_TYPE_UNMAXIMIZE,
|
||||
ACTION_TYPE_TOGGLE_FULLSCREEN,
|
||||
ACTION_TYPE_SET_DECORATIONS,
|
||||
ACTION_TYPE_TOGGLE_DECORATIONS,
|
||||
|
|
@ -135,6 +136,7 @@ const char *action_names[] = {
|
|||
"ShowMenu",
|
||||
"ToggleMaximize",
|
||||
"Maximize",
|
||||
"UnMaximize",
|
||||
"ToggleFullscreen",
|
||||
"SetDecorations",
|
||||
"ToggleDecorations",
|
||||
|
|
@ -338,6 +340,7 @@ action_arg_from_xml_node(struct action *action, const char *nodename, const char
|
|||
break;
|
||||
case ACTION_TYPE_TOGGLE_MAXIMIZE:
|
||||
case ACTION_TYPE_MAXIMIZE:
|
||||
case ACTION_TYPE_UNMAXIMIZE:
|
||||
if (!strcmp(argument, "direction")) {
|
||||
enum view_axis axis = view_axis_parse(content);
|
||||
if (axis == VIEW_AXIS_NONE) {
|
||||
|
|
@ -814,6 +817,14 @@ actions_run(struct view *activator, struct server *server,
|
|||
/*store_natural_geometry*/ true);
|
||||
}
|
||||
break;
|
||||
case ACTION_TYPE_UNMAXIMIZE:
|
||||
if (view) {
|
||||
enum view_axis axis = action_get_int(action,
|
||||
"direction", VIEW_AXIS_BOTH);
|
||||
view_maximize(view, view->maximized & ~axis,
|
||||
/*store_natural_geometry*/ true);
|
||||
}
|
||||
break;
|
||||
case ACTION_TYPE_TOGGLE_FULLSCREEN:
|
||||
if (view) {
|
||||
view_toggle_fullscreen(view);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue