Exclusive Fullscreen Mode

Roland Plüss roland at rptd.ch
Mon Sep 6 18:33:48 PDT 2010



On 09/07/2010 01:29 AM, Tomas Carnecky wrote:
> 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.
Sounds good. I checked out that Randr extension. I can't though wrap my
head around how to use it. Under OpenGL you have a glGetProcAddress
function to obtain function pointers once you know an extension exists.
In X as far as I get it there is no such facility as you have to send
the properly formated requests to the server which Xlib provided
functions do behind the curtain. I somehow can not find in the scarce
documentation how to send such requests bare handed using Xlib. Is there
something liks XSendRequest? I assume you have to do it like that, right?

-- 
Mit freundlichen Grüssen
Plüss Roland

Leader und Head Programmer
- Game: Epsylon ( http://www.indiedb.com/games/epsylon ,
http://epsylon.rptd.ch )
- Game Engine: Drag[en]gine ( http://www.indiedb.com/engines/dragengine
, http://dragengine.rptd.ch )
- Normal Map Generator: DENormGen ( http://epsylon.rptd.ch/denormgen.php
) and others

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.x.org/archives/xorg/attachments/20100907/eb8ede56/attachment.pgp>


More information about the xorg mailing list