From 620cd84a8a393245558d33c69d73d202bf2d2fae Mon Sep 17 00:00:00 2001 From: Johan Malm Date: Tue, 17 Aug 2021 07:24:27 +0100 Subject: [PATCH] view: apply output scale in view_center() --- src/view.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/view.c b/src/view.c index a311e142..9cb284c7 100644 --- a/src/view.c +++ b/src/view.c @@ -59,8 +59,8 @@ view_center(struct view *view) struct wlr_output_layout *layout = view->server->output_layout; struct wlr_output_layout_output* ol_output = wlr_output_layout_get(layout, wlr_output); - int center_x = ol_output->x + wlr_output->width / 2; - int center_y = ol_output->y + wlr_output->height / 2; + int center_x = ol_output->x + wlr_output->width / wlr_output->scale / 2; + int center_y = ol_output->y + wlr_output->height / wlr_output->scale / 2; view_move(view, center_x - view->w / 2, center_y - view->h / 2); }