Module: wine Branch: master Commit: de66ea9df6746917cada71d2c27b5cc38cbdd2f0 URL: https://gitlab.winehq.org/wine/wine/-/commit/de66ea9df6746917cada71d2c27b5cc...
Author: Alexandros Frantzis alexandros.frantzis@collabora.com Date: Sat Oct 14 17:53:39 2023 +0300
winewayland.drv: Ensure the logical output dimensions have sane values.
If the compositor doesn't provide the logical dimensions (or sane ones), use the physical pixel dimensions as the logical dimensions.
---
dlls/winewayland.drv/wayland_output.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/dlls/winewayland.drv/wayland_output.c b/dlls/winewayland.drv/wayland_output.c index 268b4593fd8..f5941c10f6f 100644 --- a/dlls/winewayland.drv/wayland_output.c +++ b/dlls/winewayland.drv/wayland_output.c @@ -167,6 +167,14 @@ static void wayland_output_done(struct wayland_output *output)
output->pending_flags = 0;
+ /* Ensure the logical dimensions have sane values. */ + if ((!output->current.logical_w || !output->current.logical_h) && + output->current.current_mode) + { + output->current.logical_w = output->current.current_mode->width; + output->current.logical_h = output->current.current_mode->height; + } + pthread_mutex_unlock(&process_wayland.output_mutex);
TRACE("name=%s logical=%d,%d+%dx%d\n",