summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonardo Hernández Hernández <leohdz172@proton.me>2024-07-12 21:08:48 -0600
committerLeonardo Hernández Hernández <leohdz172@proton.me>2024-07-12 21:08:48 -0600
commit043ab3ac1335d7a1cd84fe0f9cea8056977211a4 (patch)
tree481bf67bdb5d2f1217db0422e99b9dc1b2faea45
parentaede3b294b1b78afb1ceaf2214b8cc024a775974 (diff)
Revert "place child clients above fullscreen clients"
This does not work as intended. Lets revert it temporarily and add it back after the release. This reverts commit 298949bbc4eae8cedb9cdd11cfc9ebd139ac5d5f.
-rw-r--r--client.h12
-rw-r--r--dwl.c13
2 files changed, 5 insertions, 20 deletions
diff --git a/client.h b/client.h
index 42f225f..f0e5445 100644
--- a/client.h
+++ b/client.h
@@ -183,18 +183,6 @@ client_get_parent(Client *c)
return p;
}
-static inline int
-client_has_children(Client *c)
-{
-#ifdef XWAYLAND
- if (client_is_x11(c))
- return !wl_list_empty(&c->surface.xwayland->children);
-#endif
- /* surface.xdg->link is never empty because it always contains at least the
- * surface itself. */
- return wl_list_length(&c->surface.xdg->link) > 1;
-}
-
static inline const char *
client_get_title(Client *c)
{
diff --git a/dwl.c b/dwl.c
index dc0437e..145fd01 100644
--- a/dwl.c
+++ b/dwl.c
@@ -1404,7 +1404,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 && !client_has_children(sel)))
+ if (!sel || sel->isfullscreen)
return;
if (arg->i > 0) {
wl_list_for_each(c, &sel->link, link) {
@@ -1638,8 +1638,7 @@ void
mapnotify(struct wl_listener *listener, void *data)
{
/* Called when the surface is mapped, or ready to display on-screen. */
- Client *p = NULL;
- Client *w, *c = wl_container_of(listener, c, map);
+ Client *p, *w, *c = wl_container_of(listener, c, map);
Monitor *m;
int i;
@@ -1695,7 +1694,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 != p && w->isfullscreen && m == w->mon && (w->tags & c->tags))
+ if (w != c && w->isfullscreen && m == w->mon && (w->tags & c->tags))
setfullscreen(w, 0);
}
}
@@ -2256,14 +2255,12 @@ 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 ||
- (p && p->isfullscreen) ? LyrFS
- : c->isfloating ? LyrFloat : LyrTile]);
+ wlr_scene_node_reparent(&c->scene->node, layers[c->isfullscreen
+ ? LyrFS : c->isfloating ? LyrFloat : LyrTile]);
arrange(c->mon);
printstatus();
}