Work around flaky XIM modules
authorDaniel Colascione <dancol@dancol.org>
Sun, 23 Mar 2014 10:24:51 +0000 (03:24 -0700)
committerDaniel Colascione <dancol@dancol.org>
Sun, 23 Mar 2014 10:24:51 +0000 (03:24 -0700)
src/ChangeLog
src/xfns.c

index 1cce3b5..e468197 100644 (file)
@@ -1,3 +1,8 @@
+2014-03-23  Daniel Colascione  <dancol@dancol.org>
+
+       * xfns.c (create_frame_xic): If XCreateIC fails, try again without
+       XNStatusAttributes; works around flaky XIM modules, apparently.
+
 2014-03-23  Daniel Colascione  <dancol@dancol.org>
 
        * term.c (init_tty): Rearrange condition for clarity; print
index 5dbc705..de92baa 100644 (file)
@@ -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);
     }