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 3140

Summary: RelativeMouseMode causes window not to be restored on Android
Product: SDL Reporter: Wouter van Oortmerssen <aardappel>
Component: eventsAssignee: Sylvain <sylvain.becker>
Status: RESOLVED INVALID QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 2.0.3   
Hardware: ARM   
OS: Android (All)   

Description Wouter van Oortmerssen 2015-10-08 00:49:44 UTC
When RelativeMouseMode is false and you turn off the display on the android device,
SDL fails to renew a window reference when an app becomes foreground again.
The mouse cursor position becomes always (0,0) with invalid window reference.

A fix may be to update mouse focus window via SDL_SetMouseFocus() when an app's window is renewed (when becoming foreground on Anrdoid).
Comment 1 Sylvain 2017-08-12 20:12:48 UTC
"RelativeMouseMode is false" is the default, right?
It seems to work : 
- cursor is always there, after going to background/foreground, and after the screen is turn off/on.

Do you still have the issue ?
Comment 2 Wouter van Oortmerssen 2017-08-13 21:42:08 UTC
Sorry, this was 2 years ago.. no idea if it is still a problem.
Comment 3 Sylvain 2017-08-14 09:08:21 UTC
Maybe you could quickly double-check otherwise the bug may discarded.
Comment 4 Sylvain 2017-11-10 13:34:43 UTC
Closing as invalid because this is working. 

There is some issue with RelativeMouseMode set to true on Android but this is described in bug 3226