mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-11-02 09:01:43 -05:00
opt: optimize code struct
This commit is contained in:
parent
a3b3b61462
commit
692b7f867c
1 changed files with 9 additions and 9 deletions
18
src/mango.c
18
src/mango.c
|
|
@ -3963,15 +3963,6 @@ setfloating(Client *c, int floating) {
|
||||||
if (!c || !c->mon || !client_surface(c)->mapped || c->iskilling)
|
if (!c || !c->mon || !client_surface(c)->mapped || c->iskilling)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (c->isoverlay) {
|
|
||||||
wlr_scene_node_reparent(&c->scene->node, layers[LyrOverlay]);
|
|
||||||
} else if (client_should_overtop(c) && c->isfloating) {
|
|
||||||
wlr_scene_node_reparent(&c->scene->node, layers[LyrFSorOverTop]);
|
|
||||||
} else {
|
|
||||||
wlr_scene_node_reparent(&c->scene->node,
|
|
||||||
layers[c->isfloating ? LyrFloat : LyrTile]);
|
|
||||||
}
|
|
||||||
|
|
||||||
target_box = c->geom;
|
target_box = c->geom;
|
||||||
|
|
||||||
if (floating == 1 && c != grabc) {
|
if (floating == 1 && c != grabc) {
|
||||||
|
|
@ -4024,6 +4015,15 @@ setfloating(Client *c, int floating) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (c->isoverlay) {
|
||||||
|
wlr_scene_node_reparent(&c->scene->node, layers[LyrOverlay]);
|
||||||
|
} else if (client_should_overtop(c) && c->isfloating) {
|
||||||
|
wlr_scene_node_reparent(&c->scene->node, layers[LyrFSorOverTop]);
|
||||||
|
} else {
|
||||||
|
wlr_scene_node_reparent(&c->scene->node,
|
||||||
|
layers[c->isfloating ? LyrFloat : LyrTile]);
|
||||||
|
}
|
||||||
|
|
||||||
arrange(c->mon, false);
|
arrange(c->mon, false);
|
||||||
setborder_color(c);
|
setborder_color(c);
|
||||||
printstatus();
|
printstatus();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue