src/video/x11/SDL_x11window.c
changeset 6024 38e2f4644548
parent 6023 6279958d571d
child 6045 b8e995dab018
     1.1 --- a/src/video/x11/SDL_x11window.c	Sat Oct 22 02:13:35 2011 -0400
     1.2 +++ b/src/video/x11/SDL_x11window.c	Sat Oct 22 02:14:57 2011 -0400
     1.3 @@ -191,6 +191,21 @@
     1.4          }
     1.5      }
     1.6  
     1.7 +    {
     1.8 +        Window FocalWindow;
     1.9 +        int RevertTo=0;
    1.10 +        XGetInputFocus(data->videodata->display, &FocalWindow, &RevertTo);
    1.11 +        if (FocalWindow==w)
    1.12 +        {
    1.13 +            window->flags |= SDL_WINDOW_INPUT_FOCUS;
    1.14 +            SDL_SetKeyboardFocus(data->window);
    1.15 +        }
    1.16 +
    1.17 +        if (window->flags & SDL_WINDOW_INPUT_GRABBED) {
    1.18 +            /* Tell x11 to clip mouse */
    1.19 +        }
    1.20 +    }
    1.21 +
    1.22      /* FIXME: How can I tell?
    1.23         {
    1.24         DWORD style = GetWindowLong(hwnd, GWL_STYLE);