shells: Add libweston-desktop API to query position and add to shells
We're going to need this to properly send xwayland events later, so add API to get the current x,y co-ordinates of a shell surface and add it to the kiosk and desktop shells. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
committed by
Pekka Paalanen
parent
ed97387a4e
commit
d615abdffd
@@ -86,6 +86,11 @@ weston_desktop_api_set_xwayland_position(struct weston_desktop *desktop,
|
||||
struct weston_desktop_surface *surface,
|
||||
int32_t x, int32_t y);
|
||||
|
||||
void
|
||||
weston_desktop_api_get_position(struct weston_desktop *desktop,
|
||||
struct weston_desktop_surface *surface,
|
||||
int32_t *x, int32_t *y);
|
||||
|
||||
struct weston_desktop_seat *
|
||||
weston_desktop_seat_from_seat(struct weston_seat *wseat);
|
||||
|
||||
|
||||
@@ -237,3 +237,14 @@ weston_desktop_api_set_xwayland_position(struct weston_desktop *desktop,
|
||||
desktop->api.set_xwayland_position(surface, x, y,
|
||||
desktop->user_data);
|
||||
}
|
||||
|
||||
void
|
||||
weston_desktop_api_get_position(struct weston_desktop *desktop,
|
||||
struct weston_desktop_surface *surface,
|
||||
int32_t *x, int32_t *y)
|
||||
{
|
||||
if (!desktop->api.get_position)
|
||||
return;
|
||||
|
||||
desktop->api.get_position(surface, x, y, desktop->user_data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user