We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 437 - Mouse motion not registering
Summary: Mouse motion not registering
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: 1.2.11
Hardware: x86 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-14 07:47 UTC by ralphmerridew
Modified: 2007-07-08 13:41 UTC (History)
0 users

See Also:


Attachments
DGA detection test program (1.19 KB, text/x-csrc)
2007-07-08 13:02 UTC, Sam Lantinga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ralphmerridew 2007-06-14 07:47:49 UTC
I recently did a big upgrade (Ubuntu Dapper -> Edgy -> Feisty), and the mouse no longer works in certain programs (those that have special handling, like lbreakout2 or engima), and has similar problems in full screen programs (though
those programs ran with messed-up graphics previous to the upgrade, so I can't say whether the mouse worked in those before the upgrade). Any idea how to fix this?

Button presses are registered, but mouse movement is not.  All affected programs appear to use SDL.
Comment 1 Ryan C. Gordon 2007-07-04 15:09:20 UTC
Can you try exporting an environment variable before running these games?

  export SDL_VIDEOTARGET=x11
  # ...then launch the game...
  ./NameOfGameToRun

It might be using the DGA driver by default or something.

--ryan.

Comment 2 ralphmerridew 2007-07-04 15:21:47 UTC
Tried that.  No change in result.

Clarification to prior comments:
Some programs appear to detect mouse motion.  For example, Enigma will launch the ball in to the SSE whenever I move the mouse; lbreakout2 does not appear to notice mouse motion.
Comment 3 Michael Kirkland 2007-07-06 14:06:55 UTC
I'm seeing this bug in Windows XP as well, with the 1.2.11 runtimes.
Comment 4 Sam Lantinga 2007-07-07 23:22:25 UTC
Ralph, what if you set this environment variable:
export SDL_VIDEO_X11_DGAMOUSE=0

Michael, can you put together a minimal test case for Windows XP?  I just tried this myself and it worked fine.  Can you also grab the latest SVN snapshot and see if that fixes it?
http://www.libsdl.org/tmp/SDL-1.2.zip
Comment 5 ralphmerridew 2007-07-08 06:19:37 UTC
(In reply to comment #4)
> Ralph, what if you set this environment variable:
> export SDL_VIDEO_X11_DGAMOUSE=0
> 
> Michael, can you put together a minimal test case for Windows XP?  I just tried
> this myself and it worked fine.  Can you also grab the latest SVN snapshot and
> see if that fixes it?
> http://www.libsdl.org/tmp/SDL-1.2.zip
> 

Excellent!  That works, though I have to start the program from an xterm.
I'll look into ways to get that command run before menu items.  Thank you!
Comment 6 Sam Lantinga 2007-07-08 08:18:44 UTC
I can reproduce this, so I'll take a look.  Thanks!
Comment 7 Sam Lantinga 2007-07-08 11:49:31 UTC
Michael, please enter a separate bug with test case for the issue you're seeing on Windows XP.
Comment 8 Sam Lantinga 2007-07-08 12:02:07 UTC
So it appears that in the latest X servers DGA1 isn't just deprecated, it's actually gone.  If you use the old API functions, they advertise no direct access, and if you try to set them, on some servers they work but still don't advertise that they work, and on others they don't work.

I think it's time to finally retire the X11 DGA1 code.  *sigh*

For now I'm going to disable the DGA mouse code by default.
Comment 9 Sam Lantinga 2007-07-08 13:02:16 UTC
Created attachment 223 [details]
DGA detection test program

Can you build and run this test program and paste the output?
gcc -o testdga testdga.c -lX11 -lXxf86dga
Comment 10 ralphmerridew 2007-07-08 13:20:13 UTC
(In reply to comment #9)
> Created an attachment (id=223) [details]
> DGA detection test program
> 
> Can you build and run this test program and paste the output?
> gcc -o testdga testdga.c -lX11 -lXxf86dga
> 

Not sure whether that was for me or Michael, but if it was for me:

        Version        = 2.00
        Direct Video   = 0 NO-DirectGraphics NO-DirectMouse NO-DirectKeyb 
Comment 11 Sam Lantinga 2007-07-08 13:41:21 UTC
Thanks!  This is fixed in revision 3177.
Some X servers advertise the DGA extension but don't support DGA1 anymore. :)