fractional-scale-v1
has been merged into wayland-protocols
and swaywm already has support on master.
I think it might make sense to use an enum to store the current scale:
enum Scale { Unknown, // A value guessed by inspecting outputs and cross-referencing with `wl_surface::enter` events. Guessed(i32), // A value informed by the compositor via `wl_surface.preferred_buffer_scale`. Explicit(_), // The sent scale is the numerator of a fraction with a denominator of 120. Fractional(_), }
Some WIP code in the
fractional-scale
branch