Re: Patches to fix fullscreen games viewport issues with recent Xorg versions
On 11/12/2009 03:37 AM, Peter De Wachter wrote:
Op Wed, 11 Nov 2009 12:04:39 +0100
schreef Hans de Goede<firstname.lastname@example.org>:
With recent Xorg versions XF86VidModeSetViewPort() does not seem to
do anything. So fullscreen games which place an undecorated window
at 0,0 and then do XF86VidModeSetViewPort(.., 0, 0) no may end up with
the viewport wrong (showing part of the game and part of the
This can be workedaround by doing a XWarpPointer() call to 0, 0
SDL is already doing this, attached are patches for:
ClanLib-0.8 / 1.0 (0.6 and 2.x are not affected)
Are these the only ones you checked or the only ones that needed
These were the ones of which I know they use XF86VidMode, I've not done
an extensive search, so I may have missed some.
Debian has many more packages that use XF86VidModeSetViewPort:
(and that search doesn't even include the stuff in non-free).
Hmm, that is a nice feature! Very handy, yes definitely looks like some
other things will need fixing too (or xorg should be fixed)
I spent way too much time googling, and the problem seems to be this:
- XF86VidModeSwitchMode centers the viewport around the pointer
- X11 clients can request a different viewport by calling
- Except that some video drivers no longer implement that function
I think that is a spot on analysis.
Your work-around moves the pointer to the top-left corner, so that the
viewport will be located there, in the hope that's what the application
will request later. Unfortunately, some applications (I found
dvr, netrek-client-cow, zapping, vice, and I probably missed some) want
their viewport elsewhere. So they will need a different work-around.
Or they need to move their window to position 0,0 that should be easy.
I really feel the X server should be fixed instead. This functionality
is definitely in use in the wild.
I won't disagree, but I don't have the skills, and those who do have
the skills (the driver authors), I don't think will give this high priority,
but I may be wrong. So go and file bugs and please but me in the CC.