From: Daniel Colascione Date: Sun, 23 Mar 2014 10:24:51 +0000 (-0700) Subject: Work around flaky XIM modules X-Git-Url: http://git.hcoop.net/bpt/emacs.git/commitdiff_plain/b27a404396a312f13f3cc9318a427a3a87d33a6c?hp=dfdce7dc1c6876b70ecc5ef8886699d0cf158294 Work around flaky XIM modules --- diff --git a/src/ChangeLog b/src/ChangeLog index 1cce3b5c48..e468197c96 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2014-03-23 Daniel Colascione + + * xfns.c (create_frame_xic): If XCreateIC fails, try again without + XNStatusAttributes; works around flaky XIM modules, apparently. + 2014-03-23 Daniel Colascione * term.c (init_tty): Rearrange condition for clarity; print diff --git a/src/xfns.c b/src/xfns.c index 5dbc7053fd..de92baa3ce 100644 --- a/src/xfns.c +++ b/src/xfns.c @@ -2021,6 +2021,16 @@ create_frame_xic (struct frame *f) XNStatusAttributes, status_attr, XNPreeditAttributes, preedit_attr, NULL); + + /* Some input methods don't support a status pixel. */ + if (xic == NULL) + xic = XCreateIC (xim, + XNInputStyle, xic_style, + XNClientWindow, FRAME_X_WINDOW (f), + XNFocusWindow, FRAME_X_WINDOW (f), + XNPreeditAttributes, preedit_attr, + NULL); + XFree (preedit_attr); XFree (status_attr); }