diff options
| author | Leonardo Hernández Hernández <leohdz172@proton.me> | 2024-05-30 17:48:01 -0600 | 
|---|---|---|
| committer | Leonardo Hernández Hernández <leohdz172@proton.me> | 2024-06-04 13:58:16 -0600 | 
| commit | 21205f2f404ee2ae0680becbe914e6deb04df2ee (patch) | |
| tree | 4e08a40d550ae9a8a86f625a21912ee0322eabbf /dwl.c | |
| parent | 8f6fca35d0710b347836dcaf3543e85e58783e22 (diff) | |
make sure clients share the same layer on floating layout
Diffstat (limited to 'dwl.c')
| -rw-r--r-- | dwl.c | 17 | 
1 files changed, 16 insertions, 1 deletions
@@ -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  | 
