mirror of
https://github.com/labwc/labwc.git
synced 2026-04-11 08:21:13 -04:00
Add openbox style decoration actions
- Decorate, set full decorations, ie titlebar and border - Undecorate, turn off all decorations - Border, border only decoration, unaffected by keepBorder setting
This commit is contained in:
parent
dda47a5e14
commit
997a7e4e5b
2 changed files with 34 additions and 1 deletions
|
|
@ -134,6 +134,18 @@ Actions are used in menus and keyboard/mouse bindings.
|
|||
windows that have client side decorations if it would increase the
|
||||
amount of decoration. Default is no.
|
||||
|
||||
*<action name="Decorate" />*
|
||||
Similar to ToggleDecorations below but a single state
|
||||
- Titlebar and borders
|
||||
|
||||
*<action name="Undecorate" />*
|
||||
Similar to ToggleDecorations below but a single state
|
||||
- No titlebar or borders
|
||||
|
||||
*<action name="Border" />*
|
||||
Similar to ToggleDecorations below but a single state
|
||||
- Borders only
|
||||
|
||||
*<action name="ToggleDecorations" />*
|
||||
Toggle decorations of focused window.
|
||||
|
||||
|
|
|
|||
23
src/action.c
23
src/action.c
|
|
@ -118,7 +118,10 @@ enum action_type {
|
|||
ACTION_TYPE_TOGGLE_TABLET_MOUSE_EMULATION,
|
||||
ACTION_TYPE_TOGGLE_MAGNIFY,
|
||||
ACTION_TYPE_ZOOM_IN,
|
||||
ACTION_TYPE_ZOOM_OUT
|
||||
ACTION_TYPE_ZOOM_OUT,
|
||||
ACTION_TYPE_DECORATE,
|
||||
ACTION_TYPE_UNDECORATE,
|
||||
ACTION_TYPE_BORDER
|
||||
};
|
||||
|
||||
const char *action_names[] = {
|
||||
|
|
@ -180,6 +183,9 @@ const char *action_names[] = {
|
|||
"ToggleMagnify",
|
||||
"ZoomIn",
|
||||
"ZoomOut",
|
||||
"Decorate",
|
||||
"Undecorate",
|
||||
"Border",
|
||||
NULL
|
||||
};
|
||||
|
||||
|
|
@ -1167,6 +1173,21 @@ actions_run(struct view *activator, struct server *server,
|
|||
case ACTION_TYPE_ZOOM_OUT:
|
||||
magnify_set_scale(server, MAGNIFY_DECREASE);
|
||||
break;
|
||||
case ACTION_TYPE_DECORATE:
|
||||
if (view) {
|
||||
view_set_ssd_mode(view, LAB_SSD_MODE_FULL);
|
||||
}
|
||||
break;
|
||||
case ACTION_TYPE_UNDECORATE:
|
||||
if (view) {
|
||||
view_set_ssd_mode(view, LAB_SSD_MODE_NONE);
|
||||
}
|
||||
break;
|
||||
case ACTION_TYPE_BORDER:
|
||||
if (view) {
|
||||
view_set_ssd_mode(view, LAB_SSD_MODE_BORDER);
|
||||
}
|
||||
break;
|
||||
case ACTION_TYPE_INVALID:
|
||||
wlr_log(WLR_ERROR, "Not executing unknown action");
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue