summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDerek Foreman <derek.foreman@collabora.com>2023-08-02 11:38:30 -0500
committerMarius Vlad <marius.vlad0@gmail.com>2023-09-18 20:35:37 +0000
commit8eed64c7dfb839f77f4afab27247616fef553230 (patch)
treecd1b98166f942128457a9ea92b0f79c1e523bdfc /include
parent49ccd7f78648e406ae0ec3b9fbf243a62bbd7770 (diff)
libweston: Add weston_view_set_position_with_offset
There are many times when we want to set a global position with a surface offset added. It's a fairly nasty operation, and most places in the code currently do it naively, ignoring the painful existence of freeform window rotations and other complex transforms that could be in play (but probably aren't) Add a helper for this and convert existing usage. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/libweston/libweston.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/libweston/libweston.h b/include/libweston/libweston.h
index 4eff82ac..6fef2902 100644
--- a/include/libweston/libweston.h
+++ b/include/libweston/libweston.h
@@ -2208,6 +2208,11 @@ void
weston_view_set_position(struct weston_view *view,
struct weston_coord_global pos);
+void
+weston_view_set_position_with_offset(struct weston_view *view,
+ struct weston_coord_global pos,
+ struct weston_coord_surface offset);
+
struct weston_coord_surface
weston_view_get_pos_offset_rel(struct weston_view *view);