Fix window size

This commit is contained in:
Andrea Cavalli 2021-09-12 14:47:05 +02:00
parent 0c9f0f9bd9
commit 70fac2be13
2 changed files with 4 additions and 4 deletions

View File

@ -173,7 +173,7 @@ update_backing_pixmaps(struct xwl_screen *xwl_screen, int width, int height)
PixmapPtr old_pixmap, new_pixmap;
old_pixmap = pScreen->GetScreenPixmap(pScreen);
new_pixmap = pScreen->CreatePixmap(pScreen, width * xwl_screen->global_output_scale, height * xwl_screen->global_output_scale,
new_pixmap = pScreen->CreatePixmap(pScreen, width, height,
pScreen->rootDepth,
CREATE_PIXMAP_USAGE_BACKING_PIXMAP);
pScreen->SetScreenPixmap(new_pixmap);
@ -183,7 +183,7 @@ update_backing_pixmaps(struct xwl_screen *xwl_screen, int width, int height)
pScreen->DestroyPixmap(old_pixmap);
}
pScreen->ResizeWindow(pRoot, 0, 0, width * xwl_screen->global_output_scale, height * xwl_screen->global_output_scale, NULL);
pScreen->ResizeWindow(pRoot, 0, 0, width, height, NULL);
}
static void

View File

@ -229,8 +229,8 @@ xwl_window_enable_viewport(struct xwl_window *xwl_window,
wp_viewport_set_source(xwl_window->viewport,
wl_fixed_from_int(0),
wl_fixed_from_int(0),
wl_fixed_from_int(emulated_mode->width),
wl_fixed_from_int(emulated_mode->height));
wl_fixed_from_int(emulated_mode->width* xwl_window->xwl_screen->global_output_scale),
wl_fixed_from_int(emulated_mode->height * xwl_window->xwl_screen->global_output_scale));
wp_viewport_set_destination(xwl_window->viewport,
xwl_output->width,
xwl_output->height);