Linux fullscreen support
Leon Hall <[email protected]>
| Newsgroups | gmane.comp.graphics.crystalspace.devel |
|---|---|
| Message-ID | <[email protected]> |
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 129 (XFree86-VidModeExtension)
Minor opcode of failed request: 10 (XF86VidModeSwitchToMode)
Value in failed request: 0x4e00002
Serial number of failed request: 90
Current serial number in output stream: 94
While there are few noted bug reports in the CS bugtracker relating to
this, such as the recent #927, the issue appears to span back as far as
2006 and suggests it does not occur under X11R6.
To address the issue I wrote an XRandR plugin that can be used, but
should be tested and refined by more experienced eyes and minds than my
own. I did change the Close() method a bit so that only the fullscreen
window itself is cleaned up and closed inside the xrandr plugin, and the
rest is done inside the xwindow plugin, since the code was already there
anyway and just needed to be tweaked a bit. As far as choosing which
plugin to use, configuring with "--without-xrandr" will default to the
XF86VM plugin.
I also did some experimentation to see if I could find the problem with
the old XFree86VideoMode extension plugin. What I found was that the the
dotclock value for "fs_mode" becomes zero after the call to
"GetModeInfo" in "EnterFullScreen". Is this a pointer issue?
For example:
Inside EnterFullscreen, just called XMapRaised
fs_mode.dotclock: 65000
fs_mode.hdisplay: 1024
fs_mode.hsyncstart: 1048
fs_mode.hsyncend: 1184
fs_mode.htotal: 1344
fs_mode.hskew: 0
fs_mode.vdisplay: 768
fs_mode.vsyncstart: 771
fs_mode.vsyncend: 777
fs_mode.vtotal: 806
fs_mode.flags: 5
fs_mode.privsize: 0
Still inside EnterFullscreen, just called GetModeInfo (dpy, screen_num,
&wm_mode)
fs_mode->dotclock: 0
fs_mode->dot->hdisplay: 1024
fs_mode->dot->hsyncstart: 1048
fs_mode->dot->hsyncend: 1184
fs_mode->dot->htotal: 1344
fs_mode->dot->hskew: 0
fs_mode->dot->vdisplay: 768
fs_mode->dot->vsyncstart: 771
fs_mode->dot->vsyncend: 777
fs_mode->dot->vtotal: 806
fs_mode->dot->flags: 5
fs_mode->dot->privsize: 0
For me, the biggest issue on this plugin is not that it's broken but
that with XF86VM I get about 25 to 30 different possible video modes for
my monitor, and many of these are variations of the same resolution with
different timings. And while that may sound great, the plugin in its
current state isn't capable of telling one from another nor does the CS
API support it as far as I can tell. I'm not saying my plugin is better,
just simpler, at least in that with the XRandR plugin, on the same
system, I get an array of 11 unique resolutions, meaning that if a
particular resolution doesn't work, then the issue could be drilled down
to that particular resolution. Try doing that with XF86VM where I get
like 8 different sets of settings for 800x600 alone.
The other issue I have is "override_redirect". You have to use it to
grab the pointer and keyboard, but using it means you can't let the
window manager handle resizing the window for fullscreen nor can you
alt-tab out. I've tried windowed and fullscreen modes without it and the
pointer and keyboard grabbing both off, and it works fine. I also did it
with resizing the initial parent window instead of reparenting as it is
currently done. The biggest issue is the garbling of the screen, an
issue that already needs to be resolved for resizing anyway. But by
reusing this window I did get a slight performance increase.
I was looking into writing a new plugin for Linux using a library that
supports all the different possible types of desktop configurations
instead of trying to reinvent the wheel. But after talking to Weltall
about it, it seems the biggest obstacle might just be finding such a
library. Multi-monitor support seems to be the biggest issue. Maybe the
trick is to find a wheel with the fewest broken spokes :P
Also, on a somewhat related matter, what do you think about adding
support for querying supported resolutions? For instance, when I load
PlaneShift, I can choose from a list of different possible resolutions,
but many of them aren't supported. What would be nice would be a way to
populate that list with only valid resolutions, or at least give the
developer that as an option.
On a personal note, I feel I should point out that while I will do what
I can to help fix this issue, I am not a skilled programmer by any
possible stretch of the imagination.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Crystal-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-develop