rust-windowing/glutin

scale_factor under KDE + wayland reported as integer value

Closed this issue · 2 comments

Recently KDE introduced support for monitors with different scale factors under Wayland. Scale factor under KDE can be fractional (under GTK the scale factor is an integer value).
I have two monitors, one with 100% scale factor, and one with 150% scale factor. I'm running cargo run --example window under KDE+ wayland.

When I move the example window from the 100% sf monitor to the 150% sf monitor, the received events erroneously reports a scale factor of 2 instead of 1.5:

WindowEvent { window_id: WindowId(Wayland(WindowId(94893836137024))),
 event: ScaleFactorChanged { scale_factor: 2.0, new_inner_size:
 PhysicalSize { width: 1600, height: 1200 } } }

AFAIK, KDE is using their own protocol extension to implement this, as the core protocol only supports integer scaling, and I believe we only use the latter thorough SCTK.

No, this protocol about output. There's no fractional scaling on Wayland in any form yet. Once it'll be added in wayland-protocols we can reopen this. I think there's some ongoing work about fractional scaling, but nothing standard.

Scaling factor of 2 is expected and how every compositor out there works.