mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-25 22:25:58 +01:00
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.
This commit is contained in:
parent
6cf0bb4b19
commit
33b437d574
3 changed files with 4 additions and 4 deletions
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue