diff options
author | Derek Foreman <derek.foreman@collabora.com> | 2023-07-18 13:29:52 -0500 |
---|---|---|
committer | Derek Foreman <derek.foreman@collabora.com> | 2023-10-03 18:19:17 +0000 |
commit | 18cce195d337c066c80303b5d7a665f3ffe6fa80 (patch) | |
tree | 83fb589e3990cf5d7888864c597131130a833baa /include | |
parent | 71e38cf2ef7f32b27fa94e60c27029abe40b1801 (diff) |
libweston: Make a common helper for clamping a coord to an output
This is a tricky bit of code and we use it in two places. Let's make a
single implementation.
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libweston/libweston.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/libweston/libweston.h b/include/libweston/libweston.h index f0ca4158..bb7bb27c 100644 --- a/include/libweston/libweston.h +++ b/include/libweston/libweston.h @@ -2040,6 +2040,10 @@ struct weston_coord_buffer __attribute__ ((warn_unused_result)) weston_coord_surface_to_buffer(const struct weston_surface *surface, struct weston_coord_surface coord); +struct weston_coord_global __attribute__ ((warn_unused_result)) +weston_coord_global_clamp_for_output(struct weston_coord_global pos, + const struct weston_output *output); + void weston_view_activate_input(struct weston_view *view, struct weston_seat *seat, |