Index: /trunk/Ohana/src/kii/picture/cursor.c
===================================================================
--- /trunk/Ohana/src/kii/picture/cursor.c	(revision 2934)
+++ /trunk/Ohana/src/kii/picture/cursor.c	(revision 2935)
@@ -37,19 +37,20 @@
 
     if (LastEvent (display, KeyPress,        &event)) {
-      value = XLookupString ((XKeyEvent *) &event, string, 9, &keysym, &composestatus);
-      
-      if ((event.xkey.x >= layout[0].picture.x) && (event.xkey.x <= layout[0].picture.x + layout[0].picture.dx) &&
-	  (event.xkey.y >= layout[0].picture.y) && (event.xkey.y <= layout[0].picture.y + layout[0].picture.dy)) {
+      status = XLookupString ((XKeyEvent *) &event, string, 9, &keysym, &composestatus);
+
+      if (!status) continue;
+      if (event.xkey.x < layout[0].picture.x) continue;
+      if (event.xkey.x > layout[0].picture.x + layout[0].picture.dx) continue;
+      if (event.xkey.y < layout[0].picture.y) continue;
+      if (event.xkey.y > layout[0].picture.y + layout[0].picture.dy) continue;
 	
-	Screen_to_Image (&x, &y, (double)event.xkey.x, (double)event.xkey.y, layout);
+      Screen_to_Image (&x, &y, (double)event.xkey.x, (double)event.xkey.y, layout);
 
-	if (isprint(string[0]))
-	  sprintf (line, "%c %6.1f %6.1f ", string[0], x, y);
-	else {
-	  sprintf (line, "X %6.1f %6.1f ", x, y);
-	  break;
-	}
-	write (layout[0].Ximage, line, 16);
+      if (isprint(string[0]))
+	sprintf (line, "%c %6.1f %6.1f ", string[0], x, y);
+      else {
+	sprintf (line, "X %6.1f %6.1f ", x, y);
       }
+      write (layout[0].Ximage, line, 16);
     }
   }
