aboutsummaryrefslogtreecommitdiff
path: root/sway/tree/view.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/tree/view.c')
-rw-r--r--sway/tree/view.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/sway/tree/view.c b/sway/tree/view.c
index 4495c150..1c1fdb47 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -615,34 +615,16 @@ void view_unmap(struct sway_view *view) {
view->surface = NULL;
}
-void view_update_position(struct sway_view *view, double lx, double ly) {
- if (view->x == lx && view->y == ly) {
- return;
- }
- container_damage_whole(view->swayc);
- view->x = lx;
- view->y = ly;
- view->swayc->current.view_x = lx;
- view->swayc->current.view_y = ly;
- if (container_is_floating(view->swayc)) {
- container_set_geometry_from_floating_view(view->swayc);
- }
- container_damage_whole(view->swayc);
-}
-
void view_update_size(struct sway_view *view, int width, int height) {
- if (view->width == width && view->height == height) {
+ if (!sway_assert(container_is_floating(view->swayc),
+ "Expected a floating container")) {
return;
}
- container_damage_whole(view->swayc);
view->width = width;
view->height = height;
view->swayc->current.view_width = width;
view->swayc->current.view_height = height;
- if (container_is_floating(view->swayc)) {
- container_set_geometry_from_floating_view(view->swayc);
- }
- container_damage_whole(view->swayc);
+ container_set_geometry_from_floating_view(view->swayc);
}
static void view_subsurface_create(struct sway_view *view,