diff --git a/intern/ghost/intern/GHOST_SystemWayland.cc b/intern/ghost/intern/GHOST_SystemWayland.cc index 9ee1440a2dc..931ad269ecb 100644 --- a/intern/ghost/intern/GHOST_SystemWayland.cc +++ b/intern/ghost/intern/GHOST_SystemWayland.cc @@ -6257,7 +6257,7 @@ static void xdg_output_handle_logical_size(void *data, CLOG_INFO(LOG, 2, "logical_size [%d, %d]", width, height); GWL_Output *output = static_cast(data); - if (output->size_logical[0] != 0 && output->size_logical[1] != 0) { + if (output->size_native[0] != 0 && output->size_native[1] != 0) { /* Original comment from SDL. */ /* FIXME(@flibit): GNOME has a bug where the logical size does not account for * scale, resulting in bogus viewport sizes. @@ -6265,9 +6265,8 @@ static void xdg_output_handle_logical_size(void *data, * Until this is fixed, validate that _some_ kind of scaling is being * done (we can't match exactly because fractional scaling can't be * detected otherwise), then override if necessary. */ - if ((output->size_logical[0] == width) && - (output->scale_fractional == (1 * FRACTIONAL_DENOMINATOR))) - { + int width_native = output->size_native[(output->transform & WL_OUTPUT_TRANSFORM_90) ? 1 : 0]; + if ((width_native == width) && (output->scale_fractional == (1 * FRACTIONAL_DENOMINATOR))) { GHOST_PRINT("xdg_output scale did not match, overriding with wl_output scale\n"); #ifdef USE_GNOME_CONFINE_HACK