diff options
author | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-05-01 19:59:36 +1000 |
---|---|---|
committer | Ryan Dwyer <ryandwyer1@gmail.com> | 2018-05-01 19:59:36 +1000 |
commit | 6ef14e99eec0d741104be3a1483b7e92de870c96 (patch) | |
tree | c4f26a5c400faaa30006d1b226d534486828442c /sway | |
parent | 19d6cc395dfcb73fa7fc70a0691a38005afc334f (diff) |
Restore view_update_position()
Diffstat (limited to 'sway')
-rw-r--r-- | sway/tree/view.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c index 7d493af9..80949c89 100644 --- a/sway/tree/view.c +++ b/sway/tree/view.c @@ -349,6 +349,19 @@ void view_unmap(struct sway_view *view) { arrange_children_of(parent); } +void view_update_position(struct sway_view *view, double ox, double oy) { + if (view->swayc->x == ox && view->swayc->y == oy) { + return; + } + + // TODO: Only allow this if the view is floating (this function will only be + // called in response to wayland clients wanting to reposition themselves). + view_damage(view, true); + view->swayc->x = ox; + view->swayc->y = oy; + view_damage(view, true); +} + void view_update_size(struct sway_view *view, int width, int height) { if (view->width == width && view->height == height) { return; |