Skip to content

gdk/wayland: Take transform into account when setting physical size

Guido Günther requested to merge guidog/gtk:wl-phys-transform-3-24 into gtk-3-24

Width and height of a GdkMonitor are derived via wl_output which talks about physical dimensions of a device and compositors usually implement this as the untransformed values (e.g. weston, wlroots).

Since the GTK client has no way to figure out if a monitor was rotated, transform the physical dimensions according to the applied wayland transform to have the physical dimensions match the logical ones.

Mutter flips the physical dimensions itself but doesn't announce the transform so this shouldn't break anything there.

This is the gtk3 version of !3515 (merged)

Merge request reports