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 1089

Summary: Merge consecutive mouse motion events with same button state
Product: SDL Reporter: Patrice Mandin <patmandin>
Component: eventsAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED ENDOFLIFE QA Contact: Sam Lantinga <slouken>
Severity: enhancement    
Priority: P2 CC: jspradlin, patmandin
Version: HG 1.2   
Hardware: All   
OS: All   
Attachments: Patch to merge mouse motion events

Description Patrice Mandin 2011-01-12 13:32:47 UTC
Created attachment 553 [details]
Patch to merge mouse motion events

Hello,

Some applications do many things between each SDL_Event they poll from the queue. 

For example, with XBMC, it checks after each mouse motion which gui element to highlight, and it may takes a while (like redrawing the whole gui) before returning back to polling next event.

What is happening, is that there is a delay between when the mouse is moved, and when the cursor is draw as a new position, due to a huge number of mouse motion events queued.

The problem is aggravated if you set your video driver to sync to vblank, as XBMC may only process 1 event per frame refresh.

The attached patch fixes it by merging a new mouse motion event to the previous queued one, so the application will only get one global event for all mouse motion that happened.
Comment 1 Jen Spradlin 2011-04-12 20:03:28 UTC
Thank you for your bug report!

We're busy working on getting SDL 1.3 ready for a high quality release, and want to make sure as many things are fixed there as possible.
Could you check to see if your bug is resolved by the latest SDL 1.3 snapshot?
http://www.libsdl.org/tmp/SDL-1.3.zip

Thanks!
Comment 2 Patrice Mandin 2011-04-26 07:02:42 UTC
xbmc currently does not compile with SDL 1.3, so I'm trying to patch it, to be able to test it against SDL 1.3 .
Comment 3 Ryan C. Gordon 2015-08-25 09:38:23 UTC
Hello, and sorry if you're getting several copies of this message by email, since we are closing many bugs at once here.

We have decided to mark all SDL 1.2-related bugs as RESOLVED ENDOFLIFE, as we don't intend to work on SDL 1.2 any further, but didn't want to mark a large quantity of bugs as RESOLVED WONTFIX, to clearly show what was left unattended to and make it easily searchable.

Our current focus is on SDL 2.0.

If you are still having problems with an ENDOFLIFE bug, your absolute best option is to move your program to SDL2, as it will likely fix the problem by default, and give you access to modern platforms and tons of super-cool new features.

Failing that, we _will_ accept small patches to fix these issues, and put them in revision control, although we do not intend to do any further official 1.2 releases.

Failing that, please feel free to contact me directly by email (icculus@icculus.org) and we'll try to find some way to help you out of your situation.

Thank you,
--ryan.