diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-11-02 23:33:06 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2017-11-02 23:33:06 -0400 |
commit | 975b9dc365d5a7bec531522320a1506323575525 (patch) | |
tree | 1672f754ff883bfd2ad669842d32e10c9bc988c3 | |
parent | ca8cf7d48dc8de94494e23292c1687c1dad766f2 (diff) |
Fix view centering on HiDPI outputs
-rw-r--r-- | rootston/desktop.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; |