summaryrefslogtreecommitdiff
path: root/dwl.c
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@proton.me>2024-07-14 21:01:36 -0600
committerLeonardo Hernández Hernández <leohdz172@proton.me>2024-07-14 21:10:44 -0600
commit9a962ce136536689b289ac126a0ad3525a13f682 (patch)
tree653b313faebdd342d13dab8fb30d141ea9aeea0b /dwl.c
parent0761fd0691ee5816a0319ebda3ba70477a1df967 (diff)
Reapply "place child clients above fullscreen clients"
This reverts commit 043ab3ac1335d7a1cd84fe0f9cea8056977211a4.
Diffstat (limited to 'dwl.c')
-rw-r--r--dwl.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/dwl.c b/dwl.c
index 4a1267b..2dbc5da 100644
--- a/dwl.c
+++ b/dwl.c
@@ -1427,7 +1427,7 @@ focusstack(const Arg *arg)
{
/* Focus the next or previous client (in tiling order) on selmon */
Client *c, *sel = focustop(selmon);
- if (!sel || sel->isfullscreen)
+ if (!sel || (sel->isfullscreen && !client_has_children(sel)))
return;
if (arg->i > 0) {
wl_list_for_each(c, &sel->link, link) {
@@ -1685,7 +1685,8 @@ void
mapnotify(struct wl_listener *listener, void *data)
{
/* Called when the surface is mapped, or ready to display on-screen. */
- Client *p, *w, *c = wl_container_of(listener, c, map);
+ Client *p = NULL;
+ Client *w, *c = wl_container_of(listener, c, map);
Monitor *m;
int i;
@@ -1741,7 +1742,7 @@ mapnotify(struct wl_listener *listener, void *data)
unset_fullscreen:
m = c->mon ? c->mon : xytomon(c->geom.x, c->geom.y);
wl_list_for_each(w, &clients, link) {
- if (w != c && w->isfullscreen && m == w->mon && (w->tags & c->tags))
+ if (w != c && w != p && w->isfullscreen && m == w->mon && (w->tags & c->tags))
setfullscreen(w, 0);
}
}
@@ -2304,12 +2305,14 @@ setcursorshape(struct wl_listener *listener, void *data)
void
setfloating(Client *c, int floating)
{
+ Client *p = client_get_parent(c);
c->isfloating = floating;
/* If in floating layout do not change the client's layer */
if (!c->mon || !client_surface(c)->mapped || !c->mon->lt[c->mon->sellt]->arrange)
return;
- wlr_scene_node_reparent(&c->scene->node, layers[c->isfullscreen
- ? LyrFS : c->isfloating ? LyrFloat : LyrTile]);
+ wlr_scene_node_reparent(&c->scene->node, layers[c->isfullscreen ||
+ (p && p->isfullscreen) ? LyrFS
+ : c->isfloating ? LyrFloat : LyrTile]);
arrange(c->mon);
printstatus();
}