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 4000

Summary: SDL2 on raspberry: mouse displayed at 0,0 after SDL_ShowCursor
Product: SDL Reporter: Laurent Merckx <laurent-merckx>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: minor    
Priority: P2    
Version: 2.0.7   
Hardware: ARM   
OS: Linux   

Description Laurent Merckx 2017-12-14 12:48:57 UTC
(already mention on the forum ... but its place is here, I think)

I have a problem with the SDL_ShowCursor method on Raspberry.

Depending on the context, my application hides or show the mouse cursor with SDL_ShowCursor.
But when calling SDL_ShowCursor(true), the cursor is displayed at 0,0 (and not at last position).

After debugging sources by myself, it seems that the problem is in SDL_rpimouse.c - RPI_ShowCursor:

vc_dispmanx_rect_set( &dst_rect, 0, 0, curdata->w, curdata->h);
should be
vc_dispmanx_rect_set( &dst_rect, mouse->x, mouse->y, curdata->w, curdata->h);

For me, it solves the problem.
Comment 1 Sam Lantinga 2017-12-19 19:17:54 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/3ec03f35f3b9