macOS: do not pass input events while having marked text

fix chinese input method backspacing issue

macOS: Set pre-edit text for IME

macOS: implement glfwPlatformUpdateIMEState

set firstRectForCharacterRange correctly

macOS: update IME position on each input

macOS: use float instead of int for updateIMEState

minor fix

macOS: ignore marked text on deadkey

fixes german keyboard input

macOS: convert markedRect to screen coord
This commit is contained in:
BlahGeek
2019-05-02 15:01:40 +08:00
committed by Kovid Goyal
parent eaba3cff0b
commit e36e44ab3a
3 changed files with 47 additions and 3 deletions

View File

@@ -143,6 +143,11 @@ on_key_input(int key, int scancode, int action, int mods, const char* text, int
} else debug("committed pre-edit text: (null)\n");
return;
case 0:
// for macOS, update ime position on every key input
// because the position is required before next input
#if defined(__APPLE__)
update_ime_position(global_state.callback_os_window, w, screen);
#endif
break;
default:
debug("invalid state, ignoring\n");