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 2728 - SDL_MOUSEMOTION outside of window - inconsistency
Summary: SDL_MOUSEMOTION outside of window - inconsistency
Status: NEW
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: 2.0.3
Hardware: x86 Windows (XP)
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-15 07:37 UTC by Mervin
Modified: 2015-08-30 21:20 UTC (History)
4 users (show)

See Also:


Attachments
patch to fix issue (1.06 KB, patch)
2015-08-30 21:20 UTC, Emily Dobervich
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mervin 2014-09-15 07:37:02 UTC
Press the left mouse button with the pointer inside the window and keep the button pressed. Move the pointer outside of the window and release the button. Now the next mouse movement outside of the window triggers a single SDL_MOUSEMOTION event, which reports absolute x,y coordinates clamped to the window dimensions but not xrel,yrel.
This event doesn't seem to be triggered directly above the window, only left right and below the window.

This SDL_MOUSEMOTION event beyond the window shouldn't appear.
Comment 1 Amit Jain 2015-08-03 10:37:34 UTC
Hi
Any update or fix for this defect ?
Comment 2 Pankaj 2015-08-11 09:32:11 UTC
Hi Mervin,

Is this defect reproduced 100% in your case?
In my case, this is being reproduced only when mouse pointer dragged fast outside the window and release the button.
Comment 3 Emily Dobervich 2015-08-30 21:20:06 UTC
Created attachment 2257 [details]
patch to fix issue

Attached a patch for this issue.

The call to SDL_UpdateMouseFocus on SDL_RELEASED originally struck me as
unnecessary, but after further digging I suspect it has something to do with
something with SUPPORT_DRAG_OUTSIDE_WINDOW. If anyone knows for sure, I'd be
interested in hearing about it.