aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
Diffstat (limited to 'sway')
-rw-r--r--sway/desktop/render.c6
-rw-r--r--sway/desktop/transaction.c4
-rw-r--r--sway/tree/view.c4
3 files changed, 6 insertions, 8 deletions
diff --git a/sway/desktop/render.c b/sway/desktop/render.c
index bd85282c..fee19a33 100644
--- a/sway/desktop/render.c
+++ b/sway/desktop/render.c
@@ -289,10 +289,8 @@ static void render_saved_view(struct sway_view *view,
}
struct wlr_box box = {
- .x = view->container->surface_x - output->lx -
- view->saved_geometry.x + saved_buf->x,
- .y = view->container->surface_y - output->ly -
- view->saved_geometry.y + saved_buf->y,
+ .x = saved_buf->x - view->saved_geometry.x - output->lx,
+ .y = saved_buf->y - view->saved_geometry.y - output->ly,
.width = saved_buf->width,
.height = saved_buf->height,
};
diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c
index eac38991..2d71ad2b 100644
--- a/sway/desktop/transaction.c
+++ b/sway/desktop/transaction.c
@@ -214,8 +214,8 @@ static void apply_container_state(struct sway_container *container,
struct sway_saved_buffer *saved_buf;
wl_list_for_each(saved_buf, &view->saved_buffers, link) {
struct wlr_box box = {
- .x = container->current.content_x - view->saved_geometry.x + saved_buf->x,
- .y = container->current.content_y - view->saved_geometry.y + saved_buf->y,
+ .x = saved_buf->x - view->saved_geometry.x,
+ .y = saved_buf->y - view->saved_geometry.y,
.width = saved_buf->width,
.height = saved_buf->height,
};
diff --git a/sway/tree/view.c b/sway/tree/view.c
index c1ce4e6b..3b1e67ea 100644
--- a/sway/tree/view.c
+++ b/sway/tree/view.c
@@ -1350,8 +1350,8 @@ static void view_save_buffer_iterator(struct wlr_surface *surface,
saved_buffer->buffer = surface->buffer;
saved_buffer->width = surface->current.width;
saved_buffer->height = surface->current.height;
- saved_buffer->x = sx;
- saved_buffer->y = sy;
+ saved_buffer->x = view->container->surface_x + sx;
+ saved_buffer->y = view->container->surface_y + sy;
saved_buffer->transform = surface->current.transform;
wlr_surface_get_buffer_source_box(surface, &saved_buffer->source_box);
wl_list_insert(&view->saved_buffers, &saved_buffer->link);