From 55095a960bb3be787831cc14208427afe2781da7 Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Sun, 12 Sep 2021 15:26:27 +0200 Subject: [PATCH] Fix window size --- hw/xwayland/xwayland-output.c | 2 +- hw/xwayland/xwayland-window.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/xwayland/xwayland-output.c b/hw/xwayland/xwayland-output.c index b8f6cd51b..d085646ea 100644 --- a/hw/xwayland/xwayland-output.c +++ b/hw/xwayland/xwayland-output.c @@ -682,7 +682,7 @@ xwl_output_create(struct xwl_screen *xwl_screen, uint32_t id) RROutputSetConnection(xwl_output->randr_output, RR_Connected); RRTellChanged(xwl_screen->screen); - xwl_output->scale = 1; + xwl_output->scale = 2; /* We want the output to be in the list as soon as created so we can * use it when binding to the xdg-output protocol... diff --git a/hw/xwayland/xwayland-window.c b/hw/xwayland/xwayland-window.c index d82b84883..1ce463fa6 100644 --- a/hw/xwayland/xwayland-window.c +++ b/hw/xwayland/xwayland-window.c @@ -694,7 +694,7 @@ xwl_resize_window(WindowPtr window, xwl_window = xwl_window_from_window(window); screen->ResizeWindow = xwl_screen->ResizeWindow; - (*screen->ResizeWindow) (window, x, y, xwl_scale_to(xwl_screen, width), xwl_scale_to(xwl_screen, height), sib); + (*screen->ResizeWindow) (window, x, y, width, height, sib); xwl_screen->ResizeWindow = screen->ResizeWindow; screen->ResizeWindow = xwl_resize_window; @@ -820,8 +820,8 @@ xwl_window_post_damage(struct xwl_window *xwl_window) } #endif - wl_surface_attach(xwl_window->surface, buffer, 0, 0); wl_surface_set_buffer_scale(xwl_window->surface, xwl_screen->global_output_scale); + wl_surface_attach(xwl_window->surface, buffer, 0, 0); /* Arbitrary limit to try to avoid flooding the Wayland * connection. If we flood it too much anyway, this could