WinRT: bug fix: game-controller/joystick button-down events weren't getting sent
authorDavid Ludwig <dludwig@pobox.com>
Tue, 24 Dec 2013 21:08:11 -0500
changeset 8551 666f05b079ea
parent 8550 321f0992541c
child 8552 abd934eac415
WinRT: bug fix: game-controller/joystick button-down events weren't getting sent
src/video/winrt/SDL_winrtvideo.cpp
--- a/src/video/winrt/SDL_winrtvideo.cpp	Sun Dec 22 21:13:35 2013 -0500
+++ b/src/video/winrt/SDL_winrtvideo.cpp	Tue Dec 24 21:08:11 2013 -0500
@@ -301,6 +301,12 @@
     */
     window->w = _this->displays[0].current_mode.w;
     window->h = _this->displays[0].current_mode.h;
+
+    /* For now, treat WinRT apps as if they always have focus.
+       TODO, WinRT: try tracking keyboard and mouse focus state with respect to snapped apps
+     */
+    SDL_SetMouseFocus(window);
+    SDL_SetKeyboardFocus(window);
  
     /* Make sure the WinRT app's IFramworkView can post events on
        behalf of SDL: