We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3019

Summary: [patch] Implemented moving the system IME via SDL_SetTextInputRect() on Windows
Product: SDL Reporter: Colby Klein <shakesoda+sdl>
Component: eventsAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: x86_64   
OS: Windows 7   
Attachments: IME position patch

Description Colby Klein 2015-06-16 03:50:57 UTC
Created attachment 2178 [details]
IME position patch

In head, SDL_SetTextInputRect doesn't move the system-provided IME on Windows. Works fine on Linux now that there's IBus support, so I knew my own code wasn't to blame here. After a long struggle with the sheer un-google-ability of anything relating to IME support, I've got a patch.

There's existing code to render a candidate list which looks like it's used when using SDL's render system, but I'm using GL and it didn't do anything of use for my case.

Patch works for me as-is - but I don't know if it conflicts with the other use case. Someone more familiar with the system should really have a look, but I've had no issues with it so far.

(BTW, I see there's some internal goodies to get the IME candidate list since it's needed for the rendering - exposing this information to the API would be very useful, as it stands I'm screwed if I want IME input on a text box that isn't in flat 2D space or when using exclusive fullscreen)
Comment 1 Sam Lantinga 2015-06-16 06:35:52 UTC
This is in, thanks!
https://hg.libsdl.org/SDL/rev/59a012991992