From 72845ad90a7c1919d25ead4765f6d1f4ece36649 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 31 Dec 2005 16:30:42 +0000 Subject: [PATCH] *** empty log message *** --- Changes | 2 ++ src/command.C | 26 ++++++++++++++++---------- src/rxvt.h | 2 +- 3 files changed, 19 insertions(+), 11 deletions(-) diff --git a/Changes b/Changes index 0875f393..22277141 100644 --- 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. diff --git a/src/command.C b/src/command.C index a2b67f7f..ba1ece3a 100644 --- a/src/command.C +++ b/src/command.C @@ -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 () diff --git a/src/rxvt.h b/src/rxvt.h index b2a7b44b..432da3b3 100644 --- a/src/rxvt.h +++ b/src/rxvt.h @@ -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 -- 2.34.1