*** empty log message ***
authorroot <root>
Sat, 31 Dec 2005 16:30:42 +0000 (16:30 +0000)
committerroot <root>
Sat, 31 Dec 2005 16:30:42 +0000 (16:30 +0000)
Changes
src/command.C
src/rxvt.h

diff --git a/Changes b/Changes
index 0875f3931ac8716f2906e53da0566309cf7368cb..222771411e65fb98f461b7324e8498c3e3a0891c 100644 (file)
--- a/Changes
+++ b/Changes
@@ -21,6 +21,8 @@ WISH: just for fun, do shade and tint with XRender.
         - implemented intensityStyles option which enables/disables bold/blink
           selecting high intensity foreground/background colours, suggested by
           Chuck Blake.
+        - move iso14755 character feedback box out of the way if it would
+          obscure the mouse cursor position.
        - replaced callback.h by a fixed version from gvpe that correctly
           returns the callback result (affects new -pty-fd semantics in urxvtc
           on a few architectures). Reported by darix.
index a2b67f7f617cdb4f43f8fcee4a322e57184c5580..ba1ece3a3b4838cf0a91187a8f476dcbd800f84b 100644 (file)
@@ -149,7 +149,7 @@ rxvt_term::iso14755_54 (int x, int y)
 
       if (t != NOCHAR || !x)
         {
-          iso14755_51 (l.t[x], l.r[x]);
+          iso14755_51 (l.t[x], l.r[x], x, y);
           iso14755buf = ISO_14755_54;
           break;
         }
@@ -159,10 +159,10 @@ rxvt_term::iso14755_54 (int x, int y)
 }
 #endif
 
-#if ENABLE_OVERLAY
 void
-rxvt_term::iso14755_51 (unicode_t ch, rend_t r)
+rxvt_term::iso14755_51 (unicode_t ch, rend_t r, int x, int y)
 {
+#if ENABLE_OVERLAY
   rxvt_fontset *fs = FONTSET (r);
   rxvt_font *f = (*fs)[fs->find_font (ch)];
   wchar_t *chr, *alloc, ch2, *fname;
@@ -170,7 +170,7 @@ rxvt_term::iso14755_51 (unicode_t ch, rend_t r)
 
   fname = rxvt_utf8towcs (f->name);
 
-#if ENABLE_COMBINING
+# if ENABLE_COMBINING
   if (IS_COMPOSE (ch))
     {
       len = rxvt_composite.expand (ch, 0);
@@ -178,7 +178,7 @@ rxvt_term::iso14755_51 (unicode_t ch, rend_t r)
       rxvt_composite.expand (ch, chr);
     }
   else
-#endif
+# endif
     {
       ch2 = ch;
 
@@ -204,7 +204,13 @@ rxvt_term::iso14755_51 (unicode_t ch, rend_t r)
   max_it (width, 8+5); // for char + hey
   max_it (width, strlen (attr));
 
-  scr_overlay_new (0, -1, width, len + 2);
+  if (y >= 0)
+    {
+      y = (y >= nrow - len - 4 && x < width + 2) ? 0 : -1;
+      x = 0;
+    }
+
+  scr_overlay_new (x, y, width, len + 2);
 
   r = SET_STYLE (OVERLAY_RSTYLE, GET_STYLE (r));
 
@@ -217,10 +223,10 @@ rxvt_term::iso14755_51 (unicode_t ch, rend_t r)
       sprintf (buf, "%8x", ch);
       scr_overlay_set (0, y, buf);
       scr_overlay_set (9, y, '=');
-#if !UNICODE3
+# if !UNICODE3
       if (ch >= 0x10000)
         ch = 0xfffd;
-#endif
+# endif
       scr_overlay_set (11, y, ch, r);
       scr_overlay_set (12, y, NOCHAR, r);
     }
@@ -230,12 +236,12 @@ rxvt_term::iso14755_51 (unicode_t ch, rend_t r)
 
   free (fname);
 
-#if ENABLE_COMBINING
+# if ENABLE_COMBINING
   if (alloc)
     delete [] alloc;
+# endif
 #endif
 }
-#endif
 
 void
 rxvt_term::commit_iso14755 ()
index b2a7b44b6687cdd2168b8432f4edd9f75ab3432e..432da3b385b6d1089ef819575f7fdb293051aeff 100644 (file)
@@ -1264,7 +1264,7 @@ struct rxvt_term : zero_initialized, rxvt_vars {
   void commit_iso14755 ();
   int hex_keyval (XKeyEvent &ev);
 # if ISO_14755
-  void iso14755_51 (unicode_t ch, rend_t r = DEFAULT_RSTYLE);
+  void iso14755_51 (unicode_t ch, rend_t r = DEFAULT_RSTYLE, int x = 0, int y = -1);
   void iso14755_54 (int x, int y);
 # endif
 #endif