| Summary: | SDL_TEXTEDITING is sent unnecessarily when window focus changes | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Vladimir <dead.futurist> |
| Component: | events | Assignee: | Sam Lantinga <slouken> |
| Status: | WAITING --- | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | adam, bugzilla-sdl |
| Version: | 2.0.1 | ||
| Hardware: | x86_64 | ||
| OS: | Windows 7 | ||
|
Description
Vladimir
2013-11-02 20:37:25 UTC
SDL_TEXTEDITING is only generated for languages using composed characters (e.g. Japanese). With it you receive the new sequence the previous one (if any) has to be replaced with. The reason why you receive it (with an empty string) when switching focus is to cancel a possibly ongoing composition. I consider this a bug. SDL_TEXTEDITING should not be sent when the user changes window focus just because there's a possibility that there was an ongoing composition. SDL should keep track of whether there actually was an ongoing composition, and only send the event in that case. That's certainly probably the better behavior. I don't have a good IME test setup here. Feel free to submit a tested patch. |