libweston-desktop: Add get_position
Plumb the new weston_desktop_api_get_position() through to xwayland. Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
This commit is contained in:
parent
d615abdffd
commit
23e3a3285a
@ -413,6 +413,18 @@ set_pid(struct weston_desktop_xwayland_surface *surface, pid_t pid)
|
||||
weston_desktop_surface_set_pid(surface->surface, pid);
|
||||
}
|
||||
|
||||
static void
|
||||
get_position(struct weston_desktop_xwayland_surface *surface,
|
||||
int32_t *x, int32_t *y)
|
||||
{
|
||||
if (!surface->surface) {
|
||||
*x = 0;
|
||||
*y = 0;
|
||||
return;
|
||||
}
|
||||
weston_desktop_api_get_position(surface->desktop, surface->surface, x, y);
|
||||
}
|
||||
|
||||
static const struct weston_desktop_xwayland_interface weston_desktop_xwayland_interface = {
|
||||
.create_surface = create_surface,
|
||||
.set_toplevel = set_toplevel,
|
||||
@ -428,6 +440,7 @@ static const struct weston_desktop_xwayland_interface weston_desktop_xwayland_in
|
||||
.set_maximized = set_maximized,
|
||||
.set_minimized = set_minimized,
|
||||
.set_pid = set_pid,
|
||||
.get_position = get_position,
|
||||
};
|
||||
|
||||
void
|
||||
|
@ -61,6 +61,9 @@ struct weston_desktop_xwayland_interface {
|
||||
void (*set_maximized)(struct weston_desktop_xwayland_surface *shsurf);
|
||||
void (*set_minimized)(struct weston_desktop_xwayland_surface *shsurf);
|
||||
void (*set_pid)(struct weston_desktop_xwayland_surface *shsurf, pid_t pid);
|
||||
void (*get_position)(struct weston_desktop_xwayland_surface *surface,
|
||||
int32_t *x, int32_t *y);
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user