Skip to content

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

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

Width and height of a GdkMonitor are derived via wl_output which talks about physical dimenisons 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 (mutter#369 (closed)).

If that looks o.k. i'm happy to look at gtk3 too.

Edited by Guido Günther

Merge request reports