Re: Patches to fix fullscreen games viewport issues with recent Xorg versions
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
> before XF86VidModeSwitchToMode().
> 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
patches? Debian has many more packages that use XF86VidModeSetViewPort:
(and that search doesn't even include the stuff in non-free).
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
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.
I really feel the X server should be fixed instead. This functionality
is definitely in use in the wild.