mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
ssd: allow hiding titlebar on maximization
<core disableMaximizedServerDecor="yes"> hides the titlebar when a window is maximized. Co-authored-by: @CosmicFusion
This commit is contained in:
parent
943f5751ee
commit
888dbedeed
6 changed files with 25 additions and 0 deletions
|
|
@ -171,6 +171,7 @@ this is for compatibility with Openbox.
|
|||
```
|
||||
<core>
|
||||
<decoration>server</decoration>
|
||||
<maximizedDecoration>titlebar</maximizedDecoration>
|
||||
<gap>0</gap>
|
||||
<adaptiveSync>no</adaptiveSync>
|
||||
<allowTearing>no</allowTearing>
|
||||
|
|
@ -186,6 +187,11 @@ this is for compatibility with Openbox.
|
|||
that it is not always possible to turn off client side decorations.
|
||||
Default is server.
|
||||
|
||||
*<core><maximizedDecoration>* [titlebar|none]
|
||||
Specify how server side decorations are shown for maximized windows.
|
||||
*titlebar* shows titlebar above a maximized window. *none* shows no server
|
||||
side decorations around a maximized window. Default is titlebar.
|
||||
|
||||
*<core><gap>*
|
||||
The distance in pixels between windows and output edges when using
|
||||
movement actions, for example MoveToEdge. Default is 0.
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
<core>
|
||||
<decoration>server</decoration>
|
||||
<maximizedDecoration>titlebar</maximizedDecoration>
|
||||
<gap>0</gap>
|
||||
<adaptiveSync>no</adaptiveSync>
|
||||
<allowTearing>no</allowTearing>
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ struct rcxml {
|
|||
|
||||
/* core */
|
||||
bool xdg_shell_server_side_deco;
|
||||
bool hide_maximized_window_titlebar;
|
||||
int gap;
|
||||
enum adaptive_sync_mode adaptive_sync;
|
||||
enum tearing_mode allow_tearing;
|
||||
|
|
|
|||
|
|
@ -1094,6 +1094,12 @@ entry(xmlNode *node, char *nodename, char *content)
|
|||
} else {
|
||||
rc.xdg_shell_server_side_deco = true;
|
||||
}
|
||||
} else if (!strcasecmp(nodename, "maximizedDecoration.core")) {
|
||||
if (!strcasecmp(content, "titlebar")) {
|
||||
rc.hide_maximized_window_titlebar = false;
|
||||
} else if (!strcasecmp(content, "none")) {
|
||||
rc.hide_maximized_window_titlebar = true;
|
||||
}
|
||||
} else if (!strcmp(nodename, "gap.core")) {
|
||||
rc.gap = atoi(content);
|
||||
} else if (!strcasecmp(nodename, "adaptiveSync.core")) {
|
||||
|
|
@ -1370,6 +1376,7 @@ rcxml_init(void)
|
|||
rc.placement_cascade_offset_y = 0;
|
||||
|
||||
rc.xdg_shell_server_side_deco = true;
|
||||
rc.hide_maximized_window_titlebar = false;
|
||||
rc.show_title = true;
|
||||
rc.title_layout_loaded = false;
|
||||
rc.ssd_keep_border = true;
|
||||
|
|
|
|||
|
|
@ -312,6 +312,12 @@ ssd_update_geometry(struct ssd *ssd)
|
|||
|| ssd->state.was_squared != squared
|
||||
|| ssd->state.was_omnipresent != view->visible_on_all_workspaces;
|
||||
|
||||
/*
|
||||
* (Un)maximization updates titlebar visibility with
|
||||
* maximizedDecoration=none
|
||||
*/
|
||||
ssd_set_titlebar(ssd, view_titlebar_visible(view));
|
||||
|
||||
if (update_extents) {
|
||||
ssd_extents_update(ssd);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1660,6 +1660,10 @@ undecorate(struct view *view)
|
|||
bool
|
||||
view_titlebar_visible(struct view *view)
|
||||
{
|
||||
if (view->maximized == VIEW_AXIS_BOTH
|
||||
&& rc.hide_maximized_window_titlebar) {
|
||||
return false;
|
||||
}
|
||||
return view->ssd_mode == LAB_SSD_MODE_FULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue