From c0bd5a363f0a190a3f8fb67e4b201b07976fc45a Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Tue, 1 Aug 2023 01:12:36 +0100 Subject: [PATCH] rc, layers: Add ignoreExclusiveArea Adds a config option to ignore the exclusive area for wl_layer clients such as waybar, allowing windows and their titlebars to appear in the same space. Signed-off-by: Joshua Ashton --- docs/labwc-config.5.scd | 5 +++++ docs/rc.xml.all | 1 + include/config/rcxml.h | 1 + src/config/rcxml.c | 2 ++ src/layers.c | 3 +++ 5 files changed, 12 insertions(+) diff --git a/docs/labwc-config.5.scd b/docs/labwc-config.5.scd index 7a9e5181..89c47741 100644 --- a/docs/labwc-config.5.scd +++ b/docs/labwc-config.5.scd @@ -102,6 +102,7 @@ Therefore, where multiple objects of the same kind are required (for example 0 no no + no ``` @@ -124,6 +125,10 @@ Therefore, where multiple objects of the same kind are required (for example be used with labwc the preferred mode of the monitor is used instead. Default is no. +** [yes|no] + Ignore the exclusive area provided by wlr_layer clients. + Default is no. + ## WINDOW SWITCHER ** diff --git a/docs/rc.xml.all b/docs/rc.xml.all index 23457f35..5ba8e472 100644 --- a/docs/rc.xml.all +++ b/docs/rc.xml.all @@ -12,6 +12,7 @@ 0 no no + no diff --git a/include/config/rcxml.h b/include/config/rcxml.h index 88a2ee0f..9a80548a 100644 --- a/include/config/rcxml.h +++ b/include/config/rcxml.h @@ -39,6 +39,7 @@ struct rcxml { int gap; bool adaptive_sync; bool reuse_output_mode; + bool ignore_exclusive_area; /* focus */ bool focus_follow_mouse; diff --git a/src/config/rcxml.c b/src/config/rcxml.c index f0af0b51..155947d0 100644 --- a/src/config/rcxml.c +++ b/src/config/rcxml.c @@ -569,6 +569,8 @@ entry(xmlNode *node, char *nodename, char *content) rc.gap = atoi(content); } else if (!strcasecmp(nodename, "adaptiveSync.core")) { set_bool(content, &rc.adaptive_sync); + } else if (!strcasecmp(nodename, "ignoreExclusiveArea.core")) { + set_bool(content, &rc.ignore_exclusive_area); } else if (!strcasecmp(nodename, "reuseOutputMode.core")) { set_bool(content, &rc.reuse_output_mode); } else if (!strcmp(nodename, "name.theme")) { diff --git a/src/layers.c b/src/layers.c index 2d750f22..fcb18212 100644 --- a/src/layers.c +++ b/src/layers.c @@ -93,6 +93,9 @@ layers_arrange(struct output *output) scene_output->y); } + if (rc.ignore_exclusive_area) + usable_area = full_area; + output->usable_area = usable_area; }