Removed unneeded Text Services Framework code from IME handling

We can get the candidate list in uiless mode using ImmGetCandidateListW() once message processing has completed
This commit is contained in:
Sam Lantinga
2024-06-28 17:09:22 -07:00
parent bdd531986b
commit d9d7104feb
4 changed files with 116 additions and 415 deletions
+3 -1
View File
@@ -1051,7 +1051,7 @@ LRESULT CALLBACK WIN_WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
#endif /* WMMSG_DEBUG */
#if !defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)
if (IME_HandleMessage(hwnd, msg, wParam, &lParam, data->videodata)) {
if (WIN_HandleIMEMessage(hwnd, msg, wParam, &lParam, data->videodata)) {
return 0;
}
#endif
@@ -2302,6 +2302,8 @@ void WIN_PumpEvents(SDL_VideoDevice *_this)
#endif /*!defined(SDL_PLATFORM_XBOXONE) && !defined(SDL_PLATFORM_XBOXSERIES)*/
WIN_UpdateIMECandidates(_this);
#ifdef SDL_PLATFORM_GDK
GDK_DispatchTaskQueue();
#endif
File diff suppressed because it is too large Load Diff
+2 -1
View File
@@ -34,6 +34,7 @@ extern int WIN_StopTextInput(SDL_VideoDevice *_this, SDL_Window *window);
extern int WIN_UpdateTextInputArea(SDL_VideoDevice *_this, SDL_Window *window);
extern int WIN_ClearComposition(SDL_VideoDevice *_this, SDL_Window *window);
extern SDL_bool IME_HandleMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM *lParam, struct SDL_VideoData *videodata);
extern SDL_bool WIN_HandleIMEMessage(HWND hwnd, UINT msg, WPARAM wParam, LPARAM *lParam, struct SDL_VideoData *videodata);
extern void WIN_UpdateIMECandidates(SDL_VideoDevice *_this);
#endif /* SDL_windowskeyboard_h_ */
+1 -8
View File
@@ -423,7 +423,6 @@ struct SDL_VideoData
#ifndef SDL_DISABLE_WINDOWS_IME
SDL_bool ime_com_initialized;
struct ITfThreadMgr *ime_threadmgr;
SDL_bool ime_initialized;
SDL_bool ime_enabled;
SDL_bool ime_available;
@@ -440,6 +439,7 @@ struct SDL_VideoData
int ime_selected_length;
SDL_bool ime_candidates_open;
SDL_bool ime_update_candidates;
char *ime_candidates[MAX_CANDLIST];
int ime_candcount;
DWORD ime_candref;
@@ -462,13 +462,6 @@ struct SDL_VideoData
/* *INDENT-ON* */ /* clang-format on */
SDL_bool ime_uiless;
struct ITfThreadMgrEx *ime_threadmgrex;
DWORD ime_uielemsinkcookie;
DWORD ime_alpnsinkcookie;
DWORD ime_openmodesinkcookie;
DWORD ime_convmodesinkcookie;
TSFSink *ime_uielemsink;
TSFSink *ime_ippasink;
#endif /* !SDL_DISABLE_WINDOWS_IME */
BYTE pre_hook_key_state[256];