summaryrefslogtreecommitdiff
path: root/dwl.c
diff options
context:
space:
mode:
Diffstat (limited to 'dwl.c')
-rw-r--r--dwl.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/dwl.c b/dwl.c
index 356b913..6f041a0 100644
--- a/dwl.c
+++ b/dwl.c
@@ -495,6 +495,20 @@ arrange(Monitor *m)
strncpy(m->ltsymbol, m->lt[m->sellt]->symbol, LENGTH(m->ltsymbol));
+ /* We move all clients (except fullscreen and unmanaged) to LyrTile while
+ * in floating layout to avoid "real" floating clients be always on top */
+ wl_list_for_each(c, &clients, link) {
+ if (c->mon != m || c->isfullscreen)
+ continue;
+
+ wlr_scene_node_reparent(&c->scene->node,
+ (!m->lt[m->sellt]->arrange && c->isfloating)
+ ? layers[LyrTile]
+ : (m->lt[m->sellt]->arrange && c->isfloating)
+ ? layers[LyrFloat]
+ : c->scene->node.parent);
+ }
+
if (m->lt[m->sellt]->arrange)
m->lt[m->sellt]->arrange(m);
motionnotify(0, NULL, 0, 0, 0, 0);
@@ -2198,7 +2212,8 @@ setfloating(Client *c, int floating)
{
Client *p = client_get_parent(c);
c->isfloating = floating;
- if (!c->mon)
+ /* If in floating layout do not change the client's layer */
+ if (!c->mon || !c->mon->lt[c->mon->sellt]->arrange)
return;
wlr_scene_node_reparent(&c->scene->node, layers[c->isfullscreen ||
(p && p->isfullscreen) ? LyrFS