aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Orzechowski <orzechowski.alexander@gmail.com>2022-08-16 08:17:13 -0400
committerAlexander Orzechowski <orzechowski.alexander@gmail.com>2022-08-22 10:18:00 -0400
commite7477c71147617572c98a7daaf5934d4ad848d2a (patch)
tree450171ac5873a0e9e108725a9669934baf91bcad
parent9bba4284e454c72f8269f766069456ad2aa17ad3 (diff)
wlr_scene: Improve awkward code style
-rw-r--r--types/scene/wlr_scene.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/types/scene/wlr_scene.c b/types/scene/wlr_scene.c
index c1d7569a..a33ea1b3 100644
--- a/types/scene/wlr_scene.c
+++ b/types/scene/wlr_scene.c
@@ -234,11 +234,9 @@ static bool _scene_nodes_in_box(struct wlr_scene_node *node, struct wlr_box *box
case WLR_SCENE_NODE_BUFFER:;
struct wlr_box node_box = { .x = lx, .y = ly };
scene_node_get_size(node, &node_box.width, &node_box.height);
- bool intersects;
- intersects = wlr_box_intersection(&node_box, &node_box, box);
-
- if (intersects && iterator(node, lx, ly, user_data)) {
+ if (wlr_box_intersection(&node_box, &node_box, box) &&
+ iterator(node, lx, ly, user_data)) {
return true;
}
break;