diff options
-rw-r--r-- | unix/tkUnixEvent.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/unix/tkUnixEvent.c b/unix/tkUnixEvent.c index fc6d699..5e8cf7c 100644 --- a/unix/tkUnixEvent.c +++ b/unix/tkUnixEvent.c @@ -175,14 +175,16 @@ TkpOpenDisplay( if (display == NULL) { return NULL; } +#ifdef TK_USE_INPUT_METHODS + if (XSetLocaleModifiers("") == NULL) { + return NULL; + } +#endif dispPtr = ckalloc(sizeof(TkDisplay)); memset(dispPtr, 0, sizeof(TkDisplay)); dispPtr->display = display; dispPtr->flags |= use_xkb; #ifdef TK_USE_INPUT_METHODS - if (XSetLocaleModifiers("") == NULL) { - return; - } OpenIM(dispPtr); XRegisterIMInstantiateCallback(dispPtr->display, NULL, NULL, NULL, InstantiateIMCallback, (XPointer) dispPtr); |