aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Orzechowski <alex@ozal.ski>2023-11-08 18:23:51 -0500
committerIsaac Freund <mail@isaacfreund.com>2023-11-14 17:27:08 +0000
commit33b437d5744fe38f333f65a2346d7c2b041212d5 (patch)
tree504c83673c0ca929f9d5fc2be59b7d5b87da04a2
parent6cf0bb4b1920e89204668c3c207aa392fc82fba7 (diff)
wlr_scene: Amend scene_buffer.point_accepts_input to take coordinate pointers
The pointers mean that we can mutate them. This will be useful later so we can hide details from the compositor when we clip subsurface trees.
-rw-r--r--include/wlr/types/wlr_scene.h2
-rw-r--r--types/scene/surface.c4
-rw-r--r--types/scene/wlr_scene.c2
3 files changed, 4 insertions, 4 deletions
diff --git a/include/wlr/types/wlr_scene.h b/include/wlr/types/wlr_scene.h
index 1fa60b65..bb5f025d 100644
--- a/include/wlr/types/wlr_scene.h
+++ b/include/wlr/types/wlr_scene.h
@@ -45,7 +45,7 @@ struct wlr_linux_dmabuf_v1;
struct wlr_output_state;
typedef bool (*wlr_scene_buffer_point_accepts_input_func_t)(
- struct wlr_scene_buffer *buffer, int sx, int sy);
+ struct wlr_scene_buffer *buffer, double *sx, double *sy);
typedef void (*wlr_scene_buffer_iterator_func_t)(
struct wlr_scene_buffer *buffer, int sx, int sy, void *user_data);
diff --git a/types/scene/surface.c b/types/scene/surface.c
index 1fe0762b..2fd6490f 100644
--- a/types/scene/surface.c
+++ b/types/scene/surface.c
@@ -148,11 +148,11 @@ static void handle_scene_surface_surface_commit(
}
static bool scene_buffer_point_accepts_input(struct wlr_scene_buffer *scene_buffer,
- int sx, int sy) {
+ double *sx, double *sy) {
struct wlr_scene_surface *scene_surface =
wlr_scene_surface_try_from_buffer(scene_buffer);
- return wlr_surface_point_accepts_input(scene_surface->surface, sx, sy);
+ return wlr_surface_point_accepts_input(scene_surface->surface, *sx, *sy);
}
static void surface_addon_destroy(struct wlr_addon *addon) {
diff --git a/types/scene/wlr_scene.c b/types/scene/wlr_scene.c
index 9df7dd22..89c9b679 100644
--- a/types/scene/wlr_scene.c
+++ b/types/scene/wlr_scene.c
@@ -1064,7 +1064,7 @@ static bool scene_node_at_iterator(struct wlr_scene_node *node,
struct wlr_scene_buffer *scene_buffer = wlr_scene_buffer_from_node(node);
if (scene_buffer->point_accepts_input &&
- !scene_buffer->point_accepts_input(scene_buffer, rx, ry)) {
+ !scene_buffer->point_accepts_input(scene_buffer, &rx, &ry)) {
return false;
}
}