Mouse range doesn't update after second SDL_SetVideoMode

Bug #1018600 reported by Clint Bellanger
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
libsdl1.2 (Ubuntu)
Fix Released
Medium
Unassigned
Precise
Invalid
Medium
Unassigned

Bug Description

Version 1.2.14-6.4ubuntu3

When calling SDL_SetVideoMode a second time to resize a window, the max range of mouse positions isn't updated.

I created the attached bare-bones test.

Instructions:
- Build/run
- Mouse over the black area, then the blue area
- Click X on the window to end the test.
- The test app writes mouse coordinates to stdout.
- If Mouse Y positions appear that are between 480 and 640, the test passes.
- If Mouse Y positions are limited to 480 max, the test fails.

The test appears to fail for 1.2.14-6.4ubuntu3. It passes on my Windows builds.

Revision history for this message
Clint Bellanger (clintbellanger) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libsdl1.2 (Ubuntu):
status: New → Confirmed
Revision history for this message
Yves (yves-gwerder) wrote :

Apparently we have this issue with 0ad (rts game).
It works with libsdl1.2.15.

Check out our bugreport:
http://trac.wildfiregames.com/ticket/1549

Probably this is the change that solved it (I didn't test all the different versions to find out which one it is exactly):
http://packages.debian.org/changelogs/pool/main/libs/libsdl1.2/libsdl1.2_1.2.15-5/changelog#version1.2.15-3

Is there any chance to get 1.2.15 into Ubuntu 12.04? Or what else can we do about this?
Please tell me if I can help. :)

Revision history for this message
Yves (yves-gwerder) wrote :

It's this changeset that solves the problem:
http://hg.libsdl.org/SDL/rev/ad4ed9f0336f

I've tested about 8 different versions until I found it out.
Now I hope an Ubuntu developer can tell us what to do next. :)

That's what I did (with multiple version):
yves@yves-desktop:~/Projekte$ mkdir sdl_ad4ed9f0336f
yves@yves-desktop:~/Projekte$ mkdir sdl_ad4ed9f0336f_install
yves@yves-desktop:~/Projekte$ cd sdl_ad4ed9f0336f
yves@yves-desktop:~/Projekte/sdl_ad4ed9f0336f$ hg clone http://hg.libsdl.org/SDL -r ad4ed9f0336f .
yves@yves-desktop:~/Projekte/sdl_ad4ed9f0336f$ ./autogen.sh
yves@yves-desktop:~/Projekte/sdl_ad4ed9f0336f$ ./configure --prefix=/home/yves/Projekte/sdl_ad4ed9f0336f_install
yves@yves-desktop:~/Projekte/sdl_ad4ed9f0336f$ make
yves@yves-desktop:~/Projekte/sdl_ad4ed9f0336f$ make install
yves@yves-desktop:~/Projekte/sdl_ad4ed9f0336f$ export SDL_CONFIG="/home/yves/Projekte/sdl_ad4ed9f0336f_install/bin/sdl-config"
yves@yves-desktop:~/Projekte/sdl_f56b95794ac8$ cd ../0ad/build/workspaces/gcc
yves@yves-desktop:~/Projekte/0adbuild/workspaces/gcc$ make clean
yves@yves-desktop:~/Projekte/0ad/build/workspaces/gcc$ cd ..
yves@yves-desktop:~/Projekte/0ad/build/workspaces$ ./clean-workspaces.sh
yves@yves-desktop:~/Projekte/0ad/build/workspaces$ ./update-workspaces.sh --with-system-enet --with-system-nvtt --with-system-mozjs185
yves@yves-desktop:~/Projekte/0ad/build/workspaces$ cd gcc
yves@yves-desktop:~/Projekte/0ad/build/workspaces/gcc$ make -j5
yves@yves-desktop:~/Projekte/0ad/build/workspaces/gcc$ cd ../../../binaries/system/
yves@yves-desktop:~/Projekte/0ad/binaries/system$ ./pyrogenesis

From another terminal:
yves@yves-desktop:~/Projekte/0ad/binaries/system$ ldd pyrogenesis | grep sdl
 libSDL-1.2.so.0 => /home/yves/Projekte/sdl_ad4ed9f0336f_install/lib/libSDL-1.2.so.0 (0x00007f136b19d000)

To reproduce the bug (shouldn't be possible with this version):
1. Configure 0ad for windowed mode by creating a configuration file here
~/.config/0ad/config/user.cfg

2. Add the following two lines to the configuration file:
windowed = "true"
hotkey.togglefullscreen = "AltGr+Return"

3. run ./pyrogenesis from 0ad/binaries/system

4. Move the mouse a bit on the main menu. Notice that the button "Enable feedback" has a hover-effect.

5. Hit AltGr+Return to toggle fullscreen mode. Notice that the hover-effect of the feedback button doesn't work. Clicking the button won't work either.

Revision history for this message
Yves (yves-gwerder) wrote :

I forgot:
If you want to test it with 0ad as I did you probably also need the build instructions:
http://trac.wildfiregames.com/wiki/BuildInstructions

Revision history for this message
Oibaf (oibaf) wrote :

According to Yves this is fixed in newer libsdl1.2 which will be provided in 12.10 quantal. To nominate for 12.04 you should contact https://launchpad.net/~ubuntu-release-nominators

Changed in libsdl1.2 (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Yves (yves-gwerder) wrote :

I've sent a message to the “Nominate to Ubuntu Release Series” team.

Revision history for this message
Kate Stewart (kate.stewart) wrote :

Have tagged it for fixing in precise. @Oibaf, There should be a "Nominate to a Series" button available at the top of the bug under the status info, that is the preferred way to get it considered for targetting a fix to a series. :)

Changed in libsdl1.2 (Ubuntu):
importance: Undecided → Medium
Changed in libsdl1.2 (Ubuntu Precise):
importance: Undecided → Medium
tags: added: precise
Changed in libsdl1.2 (Ubuntu Precise):
milestone: none → precise-updates
Revision history for this message
Oibaf (oibaf) wrote : Re: [Bug 1018600] Re: Mouse range doesn't update after second SDL_SetVideoMode

@Oibaf, There should be a
> "Nominate to a Series" button available at the top of the bug under the
> status info, that is the preferred way to get it considered for
> targetting a fix to a series. :)

Yep, I used it in the past but it's no longer available now. A Google
search revealed it was removed previous year and now only some users
(i.e. ubuntu-release-nominators) see it.

Revision history for this message
Stefan Beller (stefanbeller) wrote :

When running the provided test code in Ubuntu 12.10 I still get the error. The y position of the mouse is 479 at max.

Revision history for this message
Yves (yves-gwerder) wrote :

I've upgraded to Ubuntu 12.10 now and unfortunately the problem for 0ad is not completely solved yet.
Before the upgrade from 12.04 it wasn't possible anymore to correctly switch from windowed mode to fullscreen. The lower part of the screen became unrechable. Switching back to windowed mode and changing to fullscreen again didn't fix the problem either. Now with 12.10 the problem can be easily fixed by doing the switching again.
It seems like the behaviour can be slightly different even with the same version of sdl. Maybe there's something else involved too.

Changed in libsdl1.2 (Ubuntu Precise):
status: New → Incomplete
status: Incomplete → Opinion
status: Opinion → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.