# HG changeset patch # User dewyatt # Date 1278567347 14400 # Node ID 22aa6a631d34ebbea30e42b5a1ae19003752d930 # Parent 0fa503d49cb4d0618a3e3ef2fc4f44ee2a70cb30 Changed StartTextInput to take an SDL_Window parameter. diff -r 0fa503d49cb4 -r 22aa6a631d34 include/SDL_keyboard.h --- a/include/SDL_keyboard.h Tue Jul 06 08:22:36 2010 -0700 +++ b/include/SDL_keyboard.h Thu Jul 08 01:35:47 2010 -0400 @@ -140,7 +140,7 @@ * \sa SDL_StopTextInput() * \sa SDL_SetTextInputRect() */ -extern DECLSPEC void SDLCALL SDL_StartTextInput(void); +extern DECLSPEC void SDLCALL SDL_StartTextInput(SDL_Window *window); /** * \brief Stop receiving any text input events. diff -r 0fa503d49cb4 -r 22aa6a631d34 src/SDL_compat.c --- a/src/SDL_compat.c Tue Jul 06 08:22:36 2010 -0700 +++ b/src/SDL_compat.c Thu Jul 08 01:35:47 2010 -0400 @@ -1740,7 +1740,7 @@ switch (enable) { case 1: SDL_enabled_UNICODE = 1; - SDL_StartTextInput(); + SDL_StartTextInput(SDL_VideoWindow); break; case 0: SDL_enabled_UNICODE = 0; diff -r 0fa503d49cb4 -r 22aa6a631d34 src/events/SDL_keyboard.c --- a/src/events/SDL_keyboard.c Tue Jul 06 08:22:36 2010 -0700 +++ b/src/events/SDL_keyboard.c Thu Jul 08 01:35:47 2010 -0400 @@ -617,7 +617,7 @@ 0, 0); if (SDL_EventState(SDL_TEXTINPUT, SDL_QUERY)) { - SDL_StartTextInput(); + SDL_StartTextInput(window); } } } diff -r 0fa503d49cb4 -r 22aa6a631d34 src/video/SDL_sysvideo.h --- a/src/video/SDL_sysvideo.h Tue Jul 06 08:22:36 2010 -0700 +++ b/src/video/SDL_sysvideo.h Thu Jul 08 01:35:47 2010 -0400 @@ -299,7 +299,7 @@ void (*SuspendScreenSaver) (_THIS); /* Text input */ - void (*StartTextInput) (_THIS); + void (*StartTextInput) (_THIS, SDL_Window *window); void (*StopTextInput) (_THIS); void (*SetTextInputRect) (_THIS, SDL_Rect *rect); diff -r 0fa503d49cb4 -r 22aa6a631d34 src/video/SDL_video.c --- a/src/video/SDL_video.c Tue Jul 06 08:22:36 2010 -0700 +++ b/src/video/SDL_video.c Thu Jul 08 01:35:47 2010 -0400 @@ -3385,10 +3385,10 @@ } void -SDL_StartTextInput(void) +SDL_StartTextInput(SDL_Window *window) { if (_this && _this->StartTextInput) { - _this->StartTextInput(_this); + _this->StartTextInput(_this, window); } SDL_EventState(SDL_TEXTINPUT, SDL_ENABLE); SDL_EventState(SDL_TEXTEDITING, SDL_ENABLE); diff -r 0fa503d49cb4 -r 22aa6a631d34 src/video/win32/SDL_win32keyboard.c --- a/src/video/win32/SDL_win32keyboard.c Tue Jul 06 08:22:36 2010 -0700 +++ b/src/video/win32/SDL_win32keyboard.c Thu Jul 08 01:35:47 2010 -0400 @@ -123,9 +123,8 @@ } void -WIN_StartTextInput(_THIS) +WIN_StartTextInput(_THIS, SDL_Window *window) { - SDL_Window *window = SDL_GetKeyboardFocus(); HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd; } diff -r 0fa503d49cb4 -r 22aa6a631d34 src/video/win32/SDL_win32keyboard.h --- a/src/video/win32/SDL_win32keyboard.h Tue Jul 06 08:22:36 2010 -0700 +++ b/src/video/win32/SDL_win32keyboard.h Thu Jul 08 01:35:47 2010 -0400 @@ -31,7 +31,7 @@ extern void WIN_UpdateKeymap(void); extern void WIN_QuitKeyboard(_THIS); -extern void WIN_StartTextInput(_THIS); +extern void WIN_StartTextInput(_THIS, SDL_Window *window); extern void WIN_StopTextInput(_THIS); extern void WIN_SetTextInputRect(_THIS, SDL_Rect *rect); diff -r 0fa503d49cb4 -r 22aa6a631d34 src/video/win32/SDL_win32video.c --- a/src/video/win32/SDL_win32video.c Tue Jul 06 08:22:36 2010 -0700 +++ b/src/video/win32/SDL_win32video.c Thu Jul 08 01:35:47 2010 -0400 @@ -163,7 +163,7 @@ device->GL_DeleteContext = WIN_GL_DeleteContext; #endif device->StartTextInput = WIN_StartTextInput; - device->StopTextInput = WIN_StartTextInput; + device->StopTextInput = WIN_StopTextInput; device->SetTextInputRect = WIN_SetTextInputRect; device->free = WIN_DeleteDevice;