diff options
author | Severin <julian_eisel@web.de> | 2014-12-14 20:46:51 +0300 |
---|---|---|
committer | Severin <julian_eisel@web.de> | 2014-12-14 20:51:14 +0300 |
commit | ae6f62c4e2090ea8987bad9af67fad33cbe55966 (patch) | |
tree | 407936ed68bb4626f9da3334e312b22345e7217d /source | |
parent | c1d3532d2cbf85e1339026b7f77a4e8730124a50 (diff) |
IME fix: Quit two assert failures
We could now also remove the win->ime_data assert in wm_window_IME_end,
but think it's better to leave it for further development.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 6 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_window.c | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 31a6635c59c..413f87864f6 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -2436,6 +2436,8 @@ static void ui_textedit_ime_begin(wmWindow *win, uiBut *UNUSED(but)) /* XXX Is this really needed? */ int x, y; + BLI_assert(win->ime_data == NULL); + /* enable IME and position to cursor, it's a trick */ x = win->eventstate->x; /* flip y and move down a bit, prevent the IME panel cover the edit button */ @@ -2573,7 +2575,9 @@ static void ui_textedit_end(bContext *C, uiBut *but, uiHandleButtonData *data) WM_cursor_modal_restore(win); #ifdef WITH_INPUT_IME - ui_textedit_ime_end(win, but); + if (win->ime_data) { + ui_textedit_ime_end(win, but); + } #endif } diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c index 0b33dbb2c32..52fcdd797cb 100644 --- a/source/blender/windowmanager/intern/wm_window.c +++ b/source/blender/windowmanager/intern/wm_window.c @@ -1526,9 +1526,10 @@ bool WM_window_is_fullscreen(wmWindow *win) #ifdef WITH_INPUT_IME +/* note: keep in mind wm_window_IME_begin is also used to reposition the IME window */ void wm_window_IME_begin(wmWindow *win, int x, int y, int w, int h, bool complete) { - BLI_assert(win && (win->ime_data == NULL)); + BLI_assert(win); GHOST_BeginIME(win->ghostwin, x, win->sizey - y, w, h, complete); } |