Re: Re: Proposing _NET_WM_STATE_FULLSCREEN_EXCLUSIVE



On Thu, Oct 25, 2012 at 7:15 PM, Adel Gadllah <adel gadllah gmail com> wrote:
> 2012/10/25 Martin Gräßlin <mgraesslin kde org>:
>> On Thursday 25 October 2012 13:39:23 you wrote:
>>> > In this specific case, we sort of do have input redirection - it's just
>>> > a mouse capture to the given window. And this would solve a lot of other
>>> > problems. Requiring a compositor in the mix might kill this for games
>>> > though - Ryan, thoughts?
>>>
>>> This WM hint could certainly be used as a clue that the entire screen is
>>> occupied and thus doesn't need compositing. Is that what you were asking?
>> no, I think that was not meant. Instead of changing the resolution the
>> compositor could upscale the window. This would of course not work if
>> unredirection is used.
>
> Well the whole point of changing the resolution in games is to lower
> the bandwidth requirements so that they can get a decent framerate
> (i.e when the hardware is not powerful enough to run it at full
> resolution). Doing scaling tricks at the compositor does not really
> help with this.

Another problem -- possibly worse -- is that if you don't unredirect,
then every screen update requires the coordination of 3 different
processes (roughly speaking, the game modifies its backbuffer, asks
the X server to flip it, the X server asks the compositor to flip it,
the compositor tells the GPU to make it so). And all this while the
game is soaking up 100% available CPU. Unless the kernel scheduler
works *perfectly*, this is going to increase display jitter and
latency, which makes gamers very unhappy.

Ryan: I think the problem with what you're saying is that KWin
*doesn't* move desktop widgets around etc.; what happens is that those
widgets (and everything else that cares) see that the X server has
altered the size of the root window, and adapt to that, independently
of KWin.

Martin: I just remembered that xrandr is more complicated than I
remember, which gave me another idea. What if we used the following
strategy to implement this hint:
When the game (or VNC desktop, or mythtv, or whatever) is focused, we
do something tricky:
   - we keep the underlying "screen" size the same (so the root window
doesn't change)
   - we use the xrandr 1.2 extensions to alter the "output" (the
actual display device) so that it is at the appropriate resolution,
and displays only a portion of the root window
   - we disable "panning" (so the output won't automatically wander to
display different parts of the root window as we move the mouse)
   - we place the game window in the appropriate position, with some
black window behind it to provide any letterboxing

[See http://cgit.freedesktop.org/xorg/proto/randrproto/tree/randrproto.txt
for details on "screen"/"output"/"panning" technical details.]

This is all doable right now on the actually existing X server...
except that it will only work for switching to resolutions that are
smaller than the "normal" desktop resolution. OTOH that's all my
server supports in the first place...

-n


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]