src/events/SDL_keyboard.c
changeset 3685 64ce267332c6
parent 3502 98a819296cdc
child 3697 f7b03b6838cb
     1.1 --- a/src/events/SDL_keyboard.c	Thu Jan 21 05:49:41 2010 +0000
     1.2 +++ b/src/events/SDL_keyboard.c	Thu Jan 21 06:21:52 2010 +0000
     1.3 @@ -646,7 +646,7 @@
     1.4  }
     1.5  
     1.6  void
     1.7 -SDL_SetKeyboardFocus(int index, SDL_WindowID windowID)
     1.8 +SDL_SetKeyboardFocus(int index, SDL_Window * window)
     1.9  {
    1.10      SDL_Keyboard *keyboard = SDL_GetKeyboard(index);
    1.11      int i;
    1.12 @@ -657,7 +657,7 @@
    1.13      }
    1.14  
    1.15      /* See if the current window has lost focus */
    1.16 -    if (keyboard->focus && keyboard->focus != windowID) {
    1.17 +    if (keyboard->focus && keyboard->focus != window) {
    1.18          focus = SDL_FALSE;
    1.19          for (i = 0; i < SDL_num_keyboards; ++i) {
    1.20              if (i != index) {
    1.21 @@ -674,7 +674,7 @@
    1.22          }
    1.23      }
    1.24  
    1.25 -    keyboard->focus = windowID;
    1.26 +    keyboard->focus = window;
    1.27  
    1.28      if (keyboard->focus) {
    1.29          SDL_SendWindowEvent(keyboard->focus, SDL_WINDOWEVENT_FOCUS_GAINED,
    1.30 @@ -809,7 +809,7 @@
    1.31          event.key.keysym.sym = keyboard->keymap[scancode];
    1.32          event.key.keysym.mod = modstate;
    1.33          event.key.keysym.unicode = 0;
    1.34 -        event.key.windowID = keyboard->focus;
    1.35 +        event.key.windowID = keyboard->focus->id;
    1.36          posted = (SDL_PushEvent(&event) > 0);
    1.37      }
    1.38      return (posted);
    1.39 @@ -832,7 +832,7 @@
    1.40          event.text.type = SDL_TEXTINPUT;
    1.41          event.text.which = (Uint8) index;
    1.42          SDL_strlcpy(event.text.text, text, SDL_arraysize(event.text.text));
    1.43 -        event.text.windowID = keyboard->focus;
    1.44 +        event.text.windowID = keyboard->focus->id;
    1.45          posted = (SDL_PushEvent(&event) > 0);
    1.46      }
    1.47      return (posted);