mirror of
https://github.com/labwc/labwc.git
synced 2026-04-12 08:21:13 -04:00
decorations: add Decorate/Undecorate actions
This commit is contained in:
parent
d5f39c2ea0
commit
c9fc9e566a
2 changed files with 20 additions and 0 deletions
|
|
@ -128,6 +128,12 @@ Actions are used in menus and keyboard/mouse bindings.
|
|||
By disabling the theme configuration 'keepBorder' the first step
|
||||
will be removed and the action only toggles between on and off.
|
||||
|
||||
*<action name="Decorate" />*
|
||||
Enable decorations of focused window.
|
||||
|
||||
*<action name="Undecorate" />*
|
||||
Disable decorations of focused window.
|
||||
|
||||
*<action name="ToggleFullscreen" />*
|
||||
Toggle fullscreen state of focused window.
|
||||
|
||||
|
|
|
|||
14
src/action.c
14
src/action.c
|
|
@ -79,6 +79,8 @@ enum action_type {
|
|||
ACTION_TYPE_MAXIMIZE,
|
||||
ACTION_TYPE_TOGGLE_FULLSCREEN,
|
||||
ACTION_TYPE_TOGGLE_DECORATIONS,
|
||||
ACTION_TYPE_DECORATE,
|
||||
ACTION_TYPE_UNDECORATE,
|
||||
ACTION_TYPE_TOGGLE_ALWAYS_ON_TOP,
|
||||
ACTION_TYPE_TOGGLE_ALWAYS_ON_BOTTOM,
|
||||
ACTION_TYPE_TOGGLE_OMNIPRESENT,
|
||||
|
|
@ -132,6 +134,8 @@ const char *action_names[] = {
|
|||
"Maximize",
|
||||
"ToggleFullscreen",
|
||||
"ToggleDecorations",
|
||||
"Decorate",
|
||||
"Undecorate",
|
||||
"ToggleAlwaysOnTop",
|
||||
"ToggleAlwaysOnBottom",
|
||||
"ToggleOmnipresent",
|
||||
|
|
@ -790,6 +794,16 @@ actions_run(struct view *activator, struct server *server,
|
|||
view_toggle_decorations(view);
|
||||
}
|
||||
break;
|
||||
case ACTION_TYPE_DECORATE:
|
||||
if (view) {
|
||||
view_set_decorations(view, LAB_SSD_MODE_FULL);
|
||||
}
|
||||
break;
|
||||
case ACTION_TYPE_UNDECORATE:
|
||||
if (view) {
|
||||
view_set_decorations(view, LAB_SSD_MODE_NONE);
|
||||
}
|
||||
break;
|
||||
case ACTION_TYPE_TOGGLE_ALWAYS_ON_TOP:
|
||||
if (view) {
|
||||
view_toggle_always_on_top(view);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue