Bug#412058: libsdl1.2debian: XRandR rotation ignored when looking at resolutions for fullscreen mode

Brice Goglin Brice.Goglin at ens-lyon.org
Fri Feb 23 10:19:40 CET 2007


Package: libsdl1.2debian
Version: 1.2.11-8
Severity: normal

Hi,

I have been tracking down a problem with programs running in 
fullscreen mode when the screen is rotated (with xrandr -o left).
After talking with XSF people, we came to the conclusion that the 
problem was in libsdl because only SDL programs had the issue.

Assuming you have a 1024x768 resolution, rotated into 768x1024,
a program such a xmoto (with -fs for fullscreen) behaves as if
the resolution was 1024x768, which means the bottom of the screen
is not used while the right part of the display is outside of the
screen.

>From what I understand, the problem is caused by SDL manipulating
actual resolutions (such as 768x1024) while XRandR functions return
and take regular resolution such as 1024x768 with a rotation flag.
Thus, libSDL should look at the rotation flag and swap the vertical
and horizontal resolutions if required when talking to XRandR.
This is what the following patch does. xmoto -fs then uses the right 
resolution.

There are probably some other problems since the font are ugly (they
were before my patch). And some other programs are still not using
the right resolution, such as mplayer and stellarium (maybe the problem 
is in these programs, not in libSDL).

The problem occurs with both X packages from Etch and experimental
(xserver-xorg-core 1.2.0-2 and libxrandr{-dev,2} 1.2.0-3). I only
tested my fix against experimental but I expect it to work with Etch
too. I'll try to check that in the next days.

Note that SDL_VIDEO_X11_XRANDR=1 must be set in the environment to 
enable XRandR support in libSDL. This is kind of boring for me since
the code says it is disabled by default because of KDE, which I don't
use at all :)

Since XRandR will become very common and important with the upcoming 
Xserver 1.3.0 (expected to enter unstable right after Etch is released), 
it would be great to have this fixed soon.
The bug is also relevant for Etch, but there is only one free X driver 
(i810) supporting rotation so far, and XRandR is disabled by default in 
libSDL. So there might not be enough people this problem to justify a
fix in Etch.

Thanks,
Brice

-- System Information:
Debian Release: 4.0
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.21-rc1=topinambour
Locale: LANG=C, LC_CTYPE=fr_FR at euro (charmap=ISO-8859-15)

Versions of packages libsdl1.2debian depends on:
ii  libsdl1.2debian-alsa          1.2.11-8   Simple DirectMedia Layer (with X11

libsdl1.2debian recommends no packages.

-- no debconf information
-------------- next part --------------
Skipped content of type message/rfc822\0117bit


More information about the Pkg-sdl-maintainers mailing list