Add view_move()

This commit is contained in:
Johan Malm 2020-12-23 18:52:46 +00:00
parent c646343c1d
commit cb44f047f3
6 changed files with 31 additions and 9 deletions

View file

@ -72,6 +72,16 @@ configure(struct view *view, struct wlr_box geo)
(uint16_t)geo.height);
}
static void
move(struct view *view, double x, double y)
{
view->x = x;
view->y = y;
struct wlr_xwayland_surface *s = view->xwayland_surface;
wlr_xwayland_surface_configure(s, (int16_t)x, (int16_t)y,
(uint16_t)s->width, (uint16_t)s->height);
}
static void
_close(struct view *view)
{
@ -144,6 +154,7 @@ static const struct view_impl xwl_view_impl = {
.close = _close,
.for_each_surface = for_each_surface,
.map = map,
.move = move,
.unmap = unmap,
};