diff options
author | yiqiang <yiqiang@kylinos.cn> | 2022-08-23 15:44:26 +0800 |
---|---|---|
committer | Alexander Orzechowski <orzechowski.alexander@gmail.com> | 2022-08-26 22:19:22 +0000 |
commit | 6a11256cd0f19fa0ab26f204404e9f9e3f41f851 (patch) | |
tree | c746bb15e2638de7408d9874a66273ff7c372ab7 | |
parent | 525506559a5226302eb8b1100a94ef02e9d4df15 (diff) |
scene/wlr_scene:fix judgment of invisible node
-rw-r--r-- | types/scene/wlr_scene.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/types/scene/wlr_scene.c b/types/scene/wlr_scene.c index 102e9e3a..9516971a 100644 --- a/types/scene/wlr_scene.c +++ b/types/scene/wlr_scene.c @@ -1272,10 +1272,9 @@ static bool scene_node_invisible(struct wlr_scene_node *node) { if (node->type == WLR_SCENE_NODE_TREE) { return true; } else if (node->type == WLR_SCENE_NODE_RECT) { - float *clear = (float[4]){ 0.f, 0.f, 0.f, 0.f }; struct wlr_scene_rect *rect = scene_rect_from_node(node); - return memcmp(rect->color, clear, sizeof(float) * 4) == 0; + return rect->color[3] == 0.f; } else if (node->type == WLR_SCENE_NODE_BUFFER) { struct wlr_scene_buffer *buffer = wlr_scene_buffer_from_node(node); |