add disableMaximizedServerDecor

This commit is contained in:
Cosmo on FusionVoyager3 2025-07-07 18:52:41 +03:00
parent 4a22bea0a6
commit ac65afdaf7
4 changed files with 10 additions and 2 deletions

View file

@ -186,6 +186,11 @@ this is for compatibility with Openbox.
that it is not always possible to turn off client side decorations. that it is not always possible to turn off client side decorations.
Default is server. Default is server.
*<core><disableMaximizedServerDecor>*
Hide server side decoration when a window is maximized.
Useful for trying to replicate a KDE window controls setup where window controls
merge with the top panel
*<core><gap>* *<core><gap>*
The distance in pixels between windows and output edges when using The distance in pixels between windows and output edges when using
movement actions, for example MoveToEdge. Default is 0. movement actions, for example MoveToEdge. Default is 0.

View file

@ -70,6 +70,7 @@ struct rcxml {
enum adaptive_sync_mode adaptive_sync; enum adaptive_sync_mode adaptive_sync;
enum tearing_mode allow_tearing; enum tearing_mode allow_tearing;
bool auto_enable_outputs; bool auto_enable_outputs;
bool disable_maximized_ssd_decor;
bool reuse_output_mode; bool reuse_output_mode;
enum view_placement_policy placement_policy; enum view_placement_policy placement_policy;
bool xwayland_persistence; bool xwayland_persistence;

View file

@ -1162,6 +1162,8 @@ entry(xmlNode *node, char *nodename, char *content, struct parser_state *state)
rc.gap = atoi(content); rc.gap = atoi(content);
} else if (!strcasecmp(nodename, "adaptiveSync.core")) { } else if (!strcasecmp(nodename, "adaptiveSync.core")) {
set_adaptive_sync_mode(content, &rc.adaptive_sync); set_adaptive_sync_mode(content, &rc.adaptive_sync);
} else if (!strcasecmp(nodename, "disableMaximizedServerDecor.core")) {
set_bool(content, &rc.disable_maximized_ssd_decor);
} else if (!strcasecmp(nodename, "allowTearing.core")) { } else if (!strcasecmp(nodename, "allowTearing.core")) {
set_tearing_mode(content, &rc.allow_tearing); set_tearing_mode(content, &rc.allow_tearing);
} else if (!strcasecmp(nodename, "autoEnableOutputs.core")) { } else if (!strcasecmp(nodename, "autoEnableOutputs.core")) {

View file

@ -30,7 +30,7 @@ ssd_thickness(struct view *view)
* in border-only deco mode as view->ssd would only be set * in border-only deco mode as view->ssd would only be set
* after ssd_create() returns. * after ssd_create() returns.
*/ */
if (!view->ssd_enabled || view->fullscreen) { if (!view->ssd_enabled || view->fullscreen || (view->maximized && rc.disable_maximized_ssd_decor)) {
return (struct border){ 0 }; return (struct border){ 0 };
} }
@ -87,7 +87,7 @@ static enum ssd_part_type
get_resizing_type(const struct ssd *ssd, struct wlr_cursor *cursor) get_resizing_type(const struct ssd *ssd, struct wlr_cursor *cursor)
{ {
struct view *view = ssd ? ssd->view : NULL; struct view *view = ssd ? ssd->view : NULL;
if (!view || !cursor || !view->ssd_enabled || view->fullscreen) { if (!view || !cursor || !view->ssd_enabled || view->fullscreen || (view->maximized && rc.disable_maximized_ssd_decor)) {
return LAB_SSD_NONE; return LAB_SSD_NONE;
} }