Exclusive Fullscreen Mode

Tomas Carnecky tom at dbservice.com
Mon Sep 6 16:29:22 PDT 2010


On 9/6/10 8:51 PM, Roland Plüss wrote:
> 
> On 09/06/2010 08:17 PM, Tomas Carnecky wrote:
>> On 9/6/10 5:53 PM, Roland Plüss wrote:
>>>  I tried searching on the Internet for informations on how to take over
>>> the screen using Xlib. I think here about fullscreen exclusive access
>>> like for example SDLMAME does it. I stumbled so far though only on one
>>> single mentioning of an Xlib call which should allow switching a window
>>> into a FullscreenExclusiveMode. I could though find nothing about such a
>>> call nor this FullscreenExclusiveMode. Has anybody an idea what this
>>> FullscreenExclusiveMode could be or in general how one can make a window
>>> take over the entire screen?
>> X11 doesn't have a 'fullscreen' mode like windows. What you have to do
>> is: resize and move the window so that it covers the whole screen.
>> However, some window managers won't let you place windows wherever you
>> want (because they also want to draw window decorations etc), so the
>> modern way to fullscreen your application is to tell the window manager.
>> The window manager will then resize your window and make sure it's on
>> top of all other windows. You can do that by setting _NET_WM_STATE to
>> _NET_WM_STATE_FULLSCREEN. See [1] and/or google 'ewmh fullscreen' or
>> variations thereof.
>>
>> tom
>>
>> [1]: http://standards.freedesktop.org/wm-spec/wm-spec-latest.html#id2551694
> That sounds like a plan. Thanks for the link there. I've got two
> questions left about the topic of fullscreen with X.
> 
> 1) What about changing resolution?
> SDLMAME as far as I know changes the resolution while full screen and
> some games do this too (typically commercial ones like UT*, Quake* and
> company). I read somewhere that only root is allowed to change
> resolution on-the-fly. Another place states only resolutions in the
> xorg.conf are valid. What's the ground truth in this case? Can one
> change resolution dynamically from a client application?

Any user can change the resolution. The modern way is to use randr, on
older servers you need to use xf86vidmode. Proprietary nvidia drivers
don't use either, they have their own API for doing that.

> 2) What about performance while fullscreen?
> I'm here testing on a KDE4 system with Compositing enabled to test for a
> typical case found at actual users. I notice that performance tends to
> dwindle down a lot with Compositing enabled. While fullscreen
> compositing would not really be required. According to the text in [1]
> though the window is just placed on top of all others so compositing
> would still be running. So has this fullscreen an influence on
> performance? Do WMs like KDE switch compositing while something is
> fullscreen or stays it the same?

You'd have to run some performance tests to see if compositing has any
influence on performance. If it does, maybe you can tell the WM to not
perform compositing while your application is running. But I don't think
WMs do it automatically. I don't think they can. Things like the 3D
animated workspace/window switcher or cube in compiz require compositing
even if an application is running fullscreen.

Fullscreen doesn't mean exclusive access to the hardware or display
device. It only means that _under normal circumstances_ your window is
covering the whole screen. But the WM is still free to transform your
window when you press alt-tab or activate some fancy 3D functionality.
If you want real, undisturbed fullscreen access you'll have to kill the
WM. Then you can do whatever you want.

tom




More information about the xorg mailing list