~ruther/dwl

21205f2f404ee2ae0680becbe914e6deb04df2ee — Leonardo Hernández Hernández 10 months ago 8f6fca3
make sure clients share the same layer on floating layout
1 files changed, 16 insertions(+), 1 deletions(-)

M dwl.c
M dwl.c => dwl.c +16 -1
@@ 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

Do not follow this link