Draft: xwayland: Multi DPI support via global factor rescaling [updated using properties]

Ryan Gonzalez requested to merge refi_64/xserver:scaling-mr into master

This is an updated version of !111 & !432, with the following changes:

  • Now uses an X property, _XWAYLAND_GLOBAL_OUTPUT_SCALE, to control the scaling.
  • Includes @kode54's fixes.
  • Includes some buffer sizing fixes for non-rootless mode.
  • Rebased onto the latest master branch.

From what I can tell, the previous MR stalled with the following left open:

  • An X property should be used (this is now fixed).
  • Indecision as to whether scaling code should be all in the compositor exclusively or in both the compositor and Xwayland (the latter being this approach).

Now, as for that...I think having it in Xwayland makes the most sense. I'd imagine compositors aren't generally going to be customizing any of the shared code, so having it spread out could essentially lead to bugs and divergent behavior. On the other hand, the Xwayland code here...isn't really that large IMO.

Unfortunately, unlike the previous MR, I don't necessarily have a compositor implementation to back this up, although I'd imagine wlroots would be the easiest to use as a PoC... (I have some local changes against Mutter to support this, but they're a complete mess, and I really have no idea what I'm doing there. It's mostly just for personal use, since my end goal is to have a non-blurry Bitwig running.)

In summary: my goal here is to, at minimum, reopen discussion into how to handle this, but ideally some progress towards it can be made as well.

Merge request reports