diff src/redisplay-x.c @ 420:41dbb7a9d5f2 r21-2-18

Import from CVS: tag r21-2-18
author cvs
date Mon, 13 Aug 2007 11:24:09 +0200
parents e804706bfb8c
children 95016f13131a
line wrap: on
line diff
--- a/src/redisplay-x.c	Mon Aug 13 11:23:14 2007 +0200
+++ b/src/redisplay-x.c	Mon Aug 13 11:24:09 2007 +0200
@@ -840,10 +840,11 @@
       cachel = WINDOW_FACE_CACHEL (w, findex);
     }
 
-#ifdef HAVE_XIM
+#if defined(HAVE_XIM) && defined(XIM_XLIB)
   if (cursor && focus && (cursor_start == clip_start) && cursor_height)
-    XIM_SetSpotLocation (f, xpos - 2, dl->ypos + dl->descent - 2);
-#endif /* HAVE_XIM */
+    if (FRAME_X_XIC(f))
+      XIM_SetSpotLocation (f, xpos - 2, dl->ypos + dl->descent - 2);
+#endif /* HAVE_XIM && XIM_XLIB */
 
   bg_pmap = cachel->background_pixmap;
   if (!IMAGE_INSTANCEP (bg_pmap)
@@ -2068,8 +2069,9 @@
 
   if (focus)
     {
-#ifdef HAVE_XIM
-      XIM_SetSpotLocation (f, x - 2 , cursor_y + cursor_height - 2);
+#if defined(HAVE_XIM) && defined(XIM_XLIB)
+      if (FRAME_X_XIC(f))
+	XIM_SetSpotLocation (f, x - 2 , cursor_y + cursor_height - 2);
 #endif /* HAVE_XIM */
 
       if (NILP (bar_cursor_value))