diff options
author | Yuki Hashimoto <hzuika> | 2021-07-05 14:11:17 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-07-05 18:24:27 +0300 |
commit | 83e2f8c993dc8068eb1145e9b8f4756a54f96144 (patch) | |
tree | 5d3df9bb8e8f237c4336371f42f9bb2672107141 /source/blender/windowmanager | |
parent | ac1ed19eaefe356a1ae2ff3bfb471f940231ce06 (diff) |
macOS: support Japanese input for text buttons
Blender did not support to input East Asian characters (Chinese, Japanese,
Korean) on macOS. This patch adds support for Japanese input, by implementing
the appropriate processing for the NSTextInputClient protocol.
Technical notes:
* The conversion candidate window is drawn by the input method program calling
`firstRectForCharacterRange`.
* The string before confirmation (called `composite` in blender) is handled in
the `setMarkedText` method called by the input method program.
* The string after confirmation (called `result` in the blender) is processed
in the `insertText` method called by the input method program.
Ref T51283
Differential Revision: https://developer.blender.org/D11695
Diffstat (limited to 'source/blender/windowmanager')
-rw-r--r-- | source/blender/windowmanager/CMakeLists.txt | 2 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/windowmanager/CMakeLists.txt b/source/blender/windowmanager/CMakeLists.txt index 183b22c9791..e513c49c11b 100644 --- a/source/blender/windowmanager/CMakeLists.txt +++ b/source/blender/windowmanager/CMakeLists.txt @@ -181,7 +181,7 @@ if(WITH_INPUT_NDOF) add_definitions(-DWITH_INPUT_NDOF) endif() -if(WIN32) +if(WIN32 OR APPLE) if(WITH_INPUT_IME) add_definitions(-DWITH_INPUT_IME) endif() diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c index d59ebabc643..9657f8aa03c 100644 --- a/source/blender/windowmanager/intern/wm.c +++ b/source/blender/windowmanager/intern/wm.c @@ -168,7 +168,7 @@ static void window_manager_blend_read_data(BlendDataReader *reader, ID *id) win->eventstate = NULL; win->cursor_keymap_status = NULL; win->tweak = NULL; -#ifdef WIN32 +#if defined(WIN32) || defined(__APPLE__) win->ime_data = NULL; #endif |