patched hide-behind-fullscreen

This commit is contained in:
2025-04-25 01:18:42 +02:00
parent 7f27da9ac4
commit f2780a182b
2 changed files with 24 additions and 2 deletions

View File

@@ -12,7 +12,7 @@ static const float bordercolor[] = COLOR(0x444444ff);
static const float focuscolor[] = COLOR(0x005577ff);
static const float urgentcolor[] = COLOR(0xff0000ff);
/* This conforms to the xdg-protocol. Set the alpha to zero to restore the old behavior */
static const float fullscreen_bg[] = {0.1f, 0.1f, 0.1f, 1.0f}; /* You can also use glsl colors */
static const float fullscreen_bg[] = {0.1f, 0.1f, 0.1f, 0.0f}; /* You can also use glsl colors */
/* tagging - TAGCOUNT must be no greater than 31 */
#define TAGCOUNT (9)

24
dwl.c
View File

@@ -505,7 +505,9 @@ applyrules(Client *c)
void
arrange(Monitor *m)
{
Client *c;
LayerSurface *l;
Client *c, *sel = focustop(m);
int i;
if (!m->wlr_output->enabled)
return;
@@ -536,6 +538,26 @@ arrange(Monitor *m)
: c->scene->node.parent);
}
if (sel && sel->isfullscreen && VISIBLEON(sel, m)) {
for (i = 2; i > ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND; i--) {
wl_list_for_each(l, &sel->mon->layers[i], link)
wlr_scene_node_set_enabled(&l->scene->node, 0);
}
wl_list_for_each(c, &clients, link) {
if (c->mon != m)
continue;
wlr_scene_node_set_enabled(&c->scene->node, (sel->isfullscreen && c == sel)
|| !sel->isfullscreen);
}
}
if (!sel || (!sel->isfullscreen && VISIBLEON(sel, m))) {
for (i = 2; i > ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND; i--) {
wl_list_for_each(l, &m->layers[i], link)
wlr_scene_node_set_enabled(&l->scene->node, 1);
}
}
if (m->lt[m->sellt]->arrange)
m->lt[m->sellt]->arrange(m);
motionnotify(0, NULL, 0, 0, 0, 0);