diff --git a/include/wlr/types/wlr_scene.h b/include/wlr/types/wlr_scene.h index 9ae3d943..37abd20f 100644 --- a/include/wlr/types/wlr_scene.h +++ b/include/wlr/types/wlr_scene.h @@ -556,7 +556,7 @@ struct wlr_scene_tree *wlr_scene_subsurface_tree_create( * A NULL or empty clip will disable clipping */ void wlr_scene_subsurface_tree_set_clip(struct wlr_scene_node *node, - struct wlr_box *clip); + const struct wlr_box *clip); /** * Add a node displaying an xdg_surface and all of its sub-surfaces to the diff --git a/types/scene/subsurface_tree.c b/types/scene/subsurface_tree.c index a8d301f0..4e0a3f99 100644 --- a/types/scene/subsurface_tree.c +++ b/types/scene/subsurface_tree.c @@ -326,7 +326,7 @@ static struct wlr_scene_subsurface_tree *get_subsurface_tree_from_node( } static bool subsurface_tree_set_clip(struct wlr_scene_node *node, - struct wlr_box *clip) { + const struct wlr_box *clip) { if (node->type != WLR_SCENE_NODE_TREE) { return false; } @@ -360,7 +360,7 @@ static bool subsurface_tree_set_clip(struct wlr_scene_node *node, } void wlr_scene_subsurface_tree_set_clip(struct wlr_scene_node *node, - struct wlr_box *clip) { + const struct wlr_box *clip) { #ifndef NDEBUG bool found = #endif