From 70fac2be138b751e6e7c3a01db51ccb6ef8170c6 Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Sun, 12 Sep 2021 14:47:05 +0200 Subject: [PATCH] Fix window size --- hw/xwayland/xwayland-output.c | 4 ++-- hw/xwayland/xwayland-window.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c index caef3190c..b8f6cd51b 100644 --- a/hw/xwayland/xwayland-output.c +++ b/hw/xwayland/xwayland-output.c @@ -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 diff --git a/hw/xwayland/xwayland-window.c b/hw/xwayland/xwayland-window.c index a72816af0..472bbbc53 100644 --- a/hw/xwayland/xwayland-window.c +++ b/hw/xwayland/xwayland-window.c @@ -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);