aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sway/desktop/transaction.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/sway/desktop/transaction.c b/sway/desktop/transaction.c
index ef656102..aadd8ba5 100644
--- a/sway/desktop/transaction.c
+++ b/sway/desktop/transaction.c
@@ -255,20 +255,20 @@ static void apply_container_state(struct sway_container *container,
255 // the container. This is important for fullscreen views which 255 // the container. This is important for fullscreen views which
256 // refuse to resize to the size of the output. 256 // refuse to resize to the size of the output.
257 if (view && view->surface) { 257 if (view && view->surface) {
258 if (view->surface->current.width < container->width) { 258 if (view->geometry.width < container->current.content_width) {
259 container->surface_x = container->content_x + 259 container->surface_x = container->current.content_x +
260 (container->content_width - view->surface->current.width) / 2; 260 (container->current.content_width - view->geometry.width) / 2;
261 } else { 261 } else {
262 container->surface_x = container->content_x; 262 container->surface_x = container->current.content_x;
263 } 263 }
264 if (view->surface->current.height < container->height) { 264 if (view->geometry.height < container->current.content_height) {
265 container->surface_y = container->content_y + 265 container->surface_y = container->current.content_y +
266 (container->content_height - view->surface->current.height) / 2; 266 (container->current.content_height - view->geometry.height) / 2;
267 } else { 267 } else {
268 container->surface_y = container->content_y; 268 container->surface_y = container->current.content_y;
269 } 269 }
270 container->surface_width = view->surface->current.width; 270 container->surface_width = container->current.content_width;
271 container->surface_height = view->surface->current.height; 271 container->surface_height = container->current.content_height;
272 } 272 }
273 273
274 if (!container->node.destroying) { 274 if (!container->node.destroying) {