Fixed Bug 3217 - WinRT: after alt-tab'ing back into fullscreen app, mouse cursor is sometimes wrong
authorDavid Ludwig <dludwig@pobox.com>
Thu, 31 Dec 2015 01:40:50 -0500
changeset 99915843ea14ca5c
parent 9990 c8fd9b498b67
child 9992 2117f13501e8
Fixed Bug 3217 - WinRT: after alt-tab'ing back into fullscreen app, mouse cursor is sometimes wrong
src/core/winrt/SDL_winrtapp_direct3d.cpp
     1.1 --- a/src/core/winrt/SDL_winrtapp_direct3d.cpp	Wed Dec 30 12:44:13 2015 -0500
     1.2 +++ b/src/core/winrt/SDL_winrtapp_direct3d.cpp	Thu Dec 31 01:40:50 2015 -0500
     1.3 @@ -631,6 +631,15 @@
     1.4              // * FIXME: Update keyboard state
     1.5              // */
     1.6              //WIN_CheckClipboardUpdate(data->videodata);
     1.7 +
     1.8 +            // HACK: Resetting the mouse-cursor here seems to fix
     1.9 +            // https://bugzilla.libsdl.org/show_bug.cgi?id=3217, whereby a
    1.10 +            // WinRT app's mouse cursor may switch to Windows' 'wait' cursor,
    1.11 +            // after a user alt-tabs back into a full-screened SDL app.
    1.12 +            // This bug does not appear to reproduce 100% of the time.
    1.13 +            // It may be a bug in Windows itself (v.10.0.586.36, as tested,
    1.14 +            // and the most-recent as of this writing).
    1.15 +            SDL_SetCursor(NULL);
    1.16          } else {
    1.17              if (SDL_GetKeyboardFocus() == window) {
    1.18                  SDL_SetKeyboardFocus(NULL);