Window scaling (aka owner sizes)

Keith Packard keithp at keithp.com
Fri Aug 31 03:57:22 UTC 2018


Olivier Fourdan <ofourdan at redhat.com> writes:

> How do you plan to deal with this in your approach?

Well, that's why I'm trying to get some help here...

What we're trying to do here is replace some really ugly hacks that
Valve has made outside of the server to get applications that depend on
changing the video mode to make the application look reasonable. As
changing video modes isn't a good idea in 2018, Valve has written a
compositing manager which scales applications for output (which only
works for scaling up), and then does pretty ugly things to get mouse
input 'mostly working' -- grabbing the mouse and generating synthetic
events for the application. Yikes! Oh, and it captures attempts to set
video modes.

The proposed hacks are already *way* better than that and make these
applications work much better. There's still more to do, and I'll be
working on those bits too (like redirecting video mode settings
somehow).

The root window size shouldn't be all that interesting to applications;
they really need to know the monitor sizes and positions, and that
information is available via RandR and Xinerama. So, I'm not all that
concerned about root window size; applications relying on that are
already broken.

Ok, so to make this 'actually' work, I might have to scale not only the
window size, but the window position as well -- and then I might
actually have to scale *all* of the window sizes and positions for the
specified application.

Or, maybe we create a synthetic monitor and then pretend to applications
that their windows appear there instead.

> PS: When considering this for Xwayland, I ended up thinking that it
> would be actually easier to have different X11 screens (i.e. :0.0,
> :0.1, etc.) of different size for different scales for the X11 clients
> ended up being scaled differently (which led me to
> https://gitlab.freedesktop.org/ofourdan/xserver/tree/xwayland-multi-screen),
> but that approach introduces a lot of complexity (the CM has to play
> the proxy between all those X11 screens for things like copy/paste,
> DnD, etc.)

Yeah, X screens are probably not what you want. An X monitor might be
reasonable; those are visible in RandR and Xinerama, but leave
applications on the same screen.

I didn't want to change the owner position of the windows, but I now
wonder if that might not turn out ok?

-- 
-keith
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <https://lists.x.org/archives/xorg-devel/attachments/20180830/74ed3904/attachment.sig>


More information about the xorg-devel mailing list