going full screen nicely with Xlib ... and, hardware scaler?


sswam

Advanced Member
Joined
Dec 16, 2009
Messages
1,393
My next Pandora coding issue, how best to go fullscreen in a plain Xlib app, without using SDL.

There seem to be a few ways to do it, like:

unsigned long valuemask = 0;
XSetWindowAttributes attributes;
if (fullscreen) {
valuemask |= CWOverrideRedirect;
attributes.override_redirect = True;
}
window = XCreateWindow(display, root_window, 0, 0, w, h, 0, CopyFromParent, InputOutput, CopyFromParent, valuemask, &attributes);
and somehow using this, mentioned on freedesktop.org:

_NET_WM_STATE_FULLSCREEN

and there is something - looks complicated - with motif window manager hints, maybe out of date:

http://tonyobryan.com/index.php?article=9

The "override redirect" is pretty simple, but it normally prevents alt-tab from working to switch apps, and sometimes this is not the best. It's nice if the desktop can survive when an app locks up, without having to like ssh pandora 'killall appname' from another box. My wifi is often off!

Also, ideally I would like to be able to use the Pandora's hardware scaler with an Xlib application, i.e to zoom a smaller emulated game to take up the whole or most of the screen.

Is this possible, or the hardware scaler only works with the framebuffer (and Notaz SDL)? I think I could look this one up but yeah ... why not ask, someone might have experience good advice on it ;)

Thx in advance for any help.
 
Last edited by a moderator:
Back
Top