From 975b9dc365d5a7bec531522320a1506323575525 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Thu, 2 Nov 2017 23:33:06 -0400 Subject: Fix view centering on HiDPI outputs --- rootston/desktop.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'rootston') diff --git a/rootston/desktop.c b/rootston/desktop.c index f87be11e..fe95426f 100644 --- a/rootston/desktop.c +++ b/rootston/desktop.c @@ -126,6 +126,8 @@ bool view_center(struct roots_view *view) { int width, height; wlr_output_effective_resolution(output, &width, &height); + width /= output->scale; + height /= output->scale; double view_x = (double)(width - box.width) / 2 + l_output->x; double view_y = (double)(height - box.height) / 2 + l_output->y; -- cgit v1.2.3