Skip to content

Commit

Permalink
Check if c is fullscreen before reparenting it to LyrFloating
Browse files Browse the repository at this point in the history
  • Loading branch information
fbushstone authored and mobygit committed Oct 9, 2023
1 parent 19a95be commit b555c3b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions dwl.c
Original file line number Diff line number Diff line change
Expand Up @@ -2051,7 +2051,8 @@ setfloating(Client *c, int floating)
c->isfloating = floating;
if (!c->mon)
return;
wlr_scene_node_reparent(&c->scene->node, layers[c->isfloating ? LyrFloat : LyrTile]);
wlr_scene_node_reparent(&c->scene->node, layers[c->isfullscreen
? LyrFS : c->isfloating ? LyrFloat : LyrTile]);
arrange(c->mon);
printstatus();
}
Expand All @@ -2064,7 +2065,7 @@ setfullscreen(Client *c, int fullscreen)
return;
c->bw = fullscreen ? 0 : borderpx;
client_set_fullscreen(c, fullscreen);
wlr_scene_node_reparent(&c->scene->node, layers[fullscreen
wlr_scene_node_reparent(&c->scene->node, layers[c->isfullscreen
? LyrFS : c->isfloating ? LyrFloat : LyrTile]);

if (fullscreen) {
Expand Down Expand Up @@ -2125,8 +2126,8 @@ setmon(Client *c, Monitor *m, uint32_t newtags)
/* Make sure window actually overlaps with the monitor */
resize(c, c->geom, 0);
c->tags = newtags ? newtags : m->tagset[m->seltags]; /* assign tags of target monitor */
setfloating(c, c->isfloating);
setfullscreen(c, c->isfullscreen); /* This will call arrange(c->mon) */
setfloating(c, c->isfloating);
}
focusclient(focustop(selmon), 1);
}
Expand Down

0 comments on commit b555c3b

Please # to comment.