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 298949bbc4.
This commit is contained in:
Leonardo Hernández Hernández 2024-07-12 21:08:48 -06:00
parent aede3b294b
commit 043ab3ac13
No known key found for this signature in database
GPG key ID: E538897EE11B9624
2 changed files with 5 additions and 20 deletions

View file

@ -183,18 +183,6 @@ client_get_parent(Client *c)
return p; 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 * static inline const char *
client_get_title(Client *c) client_get_title(Client *c)
{ {

13
dwl.c
View file

@ -1404,7 +1404,7 @@ focusstack(const Arg *arg)
{ {
/* Focus the next or previous client (in tiling order) on selmon */ /* Focus the next or previous client (in tiling order) on selmon */
Client *c, *sel = focustop(selmon); Client *c, *sel = focustop(selmon);
if (!sel || (sel->isfullscreen && !client_has_children(sel))) if (!sel || sel->isfullscreen)
return; return;
if (arg->i > 0) { if (arg->i > 0) {
wl_list_for_each(c, &sel->link, link) { wl_list_for_each(c, &sel->link, link) {
@ -1638,8 +1638,7 @@ void
mapnotify(struct wl_listener *listener, void *data) mapnotify(struct wl_listener *listener, void *data)
{ {
/* Called when the surface is mapped, or ready to display on-screen. */ /* Called when the surface is mapped, or ready to display on-screen. */
Client *p = NULL; Client *p, *w, *c = wl_container_of(listener, c, map);
Client *w, *c = wl_container_of(listener, c, map);
Monitor *m; Monitor *m;
int i; int i;
@ -1695,7 +1694,7 @@ mapnotify(struct wl_listener *listener, void *data)
unset_fullscreen: unset_fullscreen:
m = c->mon ? c->mon : xytomon(c->geom.x, c->geom.y); m = c->mon ? c->mon : xytomon(c->geom.x, c->geom.y);
wl_list_for_each(w, &clients, link) { 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); setfullscreen(w, 0);
} }
} }
@ -2256,14 +2255,12 @@ setcursorshape(struct wl_listener *listener, void *data)
void void
setfloating(Client *c, int floating) setfloating(Client *c, int floating)
{ {
Client *p = client_get_parent(c);
c->isfloating = floating; c->isfloating = floating;
/* If in floating layout do not change the client's layer */ /* 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) if (!c->mon || !client_surface(c)->mapped || !c->mon->lt[c->mon->sellt]->arrange)
return; return;
wlr_scene_node_reparent(&c->scene->node, layers[c->isfullscreen || wlr_scene_node_reparent(&c->scene->node, layers[c->isfullscreen
(p && p->isfullscreen) ? LyrFS ? LyrFS : c->isfloating ? LyrFloat : LyrTile]);
: c->isfloating ? LyrFloat : LyrTile]);
arrange(c->mon); arrange(c->mon);
printstatus(); printstatus();
} }