Skip to content

[gtk4/wayland] Fix GdkMonitor sizes on Mutter without fractional scaling.

Emilio Cobos Álvarez requested to merge emilio/gtk:gtk4-monitor-size into main

This fixes a problem that is apparent in https://bugzilla.mozilla.org/show_bug.cgi?id=1869724, but that also reproduces on any GTK application as described in https://bugzilla.mozilla.org/show_bug.cgi?id=1869724#c16.

xdg_output sizes might be physical if the compositor doesn't scale them, it seems. So to report the correct logical geometry in GDK pixels, we need to detect this case. We do this by checking whether the wl_output size matches the xdg_output size.

cc @rmader

Merge request reports