Fix view centering on HiDPI outputs

This commit is contained in:
Drew DeVault 2017-11-02 23:33:06 -04:00
parent ca8cf7d48d
commit 975b9dc365
1 changed files with 2 additions and 0 deletions

View File

@ -126,6 +126,8 @@ bool view_center(struct roots_view *view) {
int width, height; int width, height;
wlr_output_effective_resolution(output, &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_x = (double)(width - box.width) / 2 + l_output->x;
double view_y = (double)(height - box.height) / 2 + l_output->y; double view_y = (double)(height - box.height) / 2 + l_output->y;