summaryrefslogtreecommitdiff
path: root/libweston-desktop/libweston-desktop.c
diff options
context:
space:
mode:
authorPekka Paalanen <pekka.paalanen@collabora.co.uk>2016-11-16 14:03:31 +0200
committerPekka Paalanen <pekka.paalanen@collabora.co.uk>2017-01-18 13:21:02 +0200
commit37111e157a10217a37b30f0d12605ba14b28667b (patch)
tree65c939ade7332651adc001a0b568904458b84a38 /libweston-desktop/libweston-desktop.c
parenteed36bbe4cdd0e4809255d75b4baba05bde92470 (diff)
libweston-desktop: add set_xwayland_position API
X11 applications expect -geometry command line option to work for setting the initial window position, but currently this does not work. Add provision to relay the initial position through libweston-desktop: - weston_desktop_api gains a new entry set_xwayland_position - implement set_toplevel_with_position() in xwayland internal interface Once xwayland plugin starts calling set_toplevel_with_position(), libweston-desktop can relay that information to a shell if the shell wants to hear it. If a shell does not implement the set_xwayland_position hook, the old behaviour remains: the shell positions xwayland toplevels like any other. Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk> Reviewed-by: Quentin Glidic <sardemff7+git@sardemff7.net> Reviewed-by: Daniel Stone <daniels@collabora.com>
Diffstat (limited to 'libweston-desktop/libweston-desktop.c')
-rw-r--r--libweston-desktop/libweston-desktop.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libweston-desktop/libweston-desktop.c b/libweston-desktop/libweston-desktop.c
index 0ee11393..48e90009 100644
--- a/libweston-desktop/libweston-desktop.c
+++ b/libweston-desktop/libweston-desktop.c
@@ -242,3 +242,13 @@ weston_desktop_api_minimized_requested(struct weston_desktop *desktop,
if (desktop->api.minimized_requested != NULL)
desktop->api.minimized_requested(surface, desktop->user_data);
}
+
+void
+weston_desktop_api_set_xwayland_position(struct weston_desktop *desktop,
+ struct weston_desktop_surface *surface,
+ int32_t x, int32_t y)
+{
+ if (desktop->api.set_xwayland_position != NULL)
+ desktop->api.set_xwayland_position(surface, x, y,
+ desktop->user_data);
+}