mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-22 07:02:28 +00:00
wlr_scene: Improve awkward code style
This commit is contained in:
parent
9bba4284e4
commit
e7477c7114
@ -234,11 +234,9 @@ static bool _scene_nodes_in_box(struct wlr_scene_node *node, struct wlr_box *box
|
|||||||
case WLR_SCENE_NODE_BUFFER:;
|
case WLR_SCENE_NODE_BUFFER:;
|
||||||
struct wlr_box node_box = { .x = lx, .y = ly };
|
struct wlr_box node_box = { .x = lx, .y = ly };
|
||||||
scene_node_get_size(node, &node_box.width, &node_box.height);
|
scene_node_get_size(node, &node_box.width, &node_box.height);
|
||||||
bool intersects;
|
|
||||||
|
|
||||||
intersects = wlr_box_intersection(&node_box, &node_box, box);
|
if (wlr_box_intersection(&node_box, &node_box, box) &&
|
||||||
|
iterator(node, lx, ly, user_data)) {
|
||||||
if (intersects && iterator(node, lx, ly, user_data)) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user