← Back to team overview

ubuntu-game-dev team mailing list archive

Re: Unredirect(ed) Fullscreen Windows

 

Hello.

By the way, I really hate when I can`t alt+tab from the fullscreen window.
It violates my freedom to pause the game and, e.g. answer to urgent Jabber
message.

Why no one can use the following snippet:

void sendFullscreenEvent(Display* display, Window win)
{
	if (win != None && win != DefaultRootWindow(display))
	{
		Atom atomFullscreen = XInternAtom(display, "_NET_WM_STATE_FULLSCREEN", True);
		Atom atomState = XInternAtom(display, "_NET_WM_STATE", True);
		XClientMessageEvent event;
		event.type = ClientMessage;
		event.serial = 0;
		event.send_event = True;
		event.window = win;
		event.message_type = atomState;
		event.format = 32;
		event.data.l[0] = 1;
		event.data.l[1] = atomFullscreen;
		event.data.l[2] = 0;
		XSendEvent(display, DefaultRootWindow(display), False,
				   SubstructureRedirectMask | SubstructureNotifyMask,
				   (XEvent*)&event);
		XFlush(display);
	}
}

It is easy, and the user will not be "locked".

I was very annoyed about this, so I`ve written a small tool, that does the
right thing instead of lazy developers.

Here is the link: https://github.com/bazhenovc/fullscreenize

Hope it will be useful.

- Kirill

2012/12/14 Daniel van Vugt <daniel.van.vugt@xxxxxxxxxxxxx>

> All,
>
> As you probably know, "unredirecting" fullscreen windows is the primary
> solution for making fullscreen gaming as fast as possible under
> Compiz/Unity.
>
> So I'm happy to announce that this feature is now turned on by default.
> The switch has been flicked in these Compiz releases:
>     0.9.7.12 for precise (due in release 12.04.2, January)
>     0.9.8.6  for quantal (work in progress for an SRU)
>     0.9.9.0  for raring (already released in raring updates)
>
> Limitations: The driver stability problems observed with nouveau and intel
> on precise have only been worked around. If Compiz finds you're using
> nouveau or intel with Mesa 8.0 then the feature will be disabled. You can
> configure this blacklist in CCSM > OpenGL.
>
> Any issues? Then please log a bug in Launchpad. I am on vacation till
> January so will not reply to emails.
>
> Happy gaming and happy holidays.
>
> - Daniel
>
>
> --
> Mailing list: https://launchpad.net/~ubuntu-**game-dev<https://launchpad.net/%7Eubuntu-game-dev>
> Post to     : ubuntu-game-dev@lists.**launchpad.net<ubuntu-game-dev@xxxxxxxxxxxxxxxxxxx>
> Unsubscribe : https://launchpad.net/~ubuntu-**game-dev<https://launchpad.net/%7Eubuntu-game-dev>
> More help   : https://help.launchpad.net/**ListHelp<https://help.launchpad.net/ListHelp>
>

Follow ups

References