opt: optimize shadow node and blur node enable
This commit is contained in:
@@ -255,8 +255,12 @@ void client_draw_shadow(Client *c) {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (!shadows || (!c->isfloating && shadow_only_floating)) {
|
if (!shadows || (!c->isfloating && shadow_only_floating)) {
|
||||||
wlr_scene_shadow_set_size(c->shadow, 0, 0);
|
if (c->shadow->node.enabled)
|
||||||
|
wlr_scene_node_set_enabled(&c->shadow->node, false);
|
||||||
return;
|
return;
|
||||||
|
} else {
|
||||||
|
if (c->scene_surface->node.enabled && !c->shadow->node.enabled)
|
||||||
|
wlr_scene_node_set_enabled(&c->shadow->node, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool hit_no_border = check_hit_no_border(c);
|
bool hit_no_border = check_hit_no_border(c);
|
||||||
|
|||||||
Reference in New Issue
Block a user