--- rxvt-unicode/src/command.C 2004/03/03 04:07:52 1.64 +++ rxvt-unicode/src/command.C 2004/03/14 17:33:07 1.68 @@ -142,27 +142,6 @@ if (valid_keysym) { - /* for some backwards compatibility */ -#if defined(HOTKEY_CTRL) || defined(HOTKEY_META) -# ifdef HOTKEY_CTRL - if (ctrl) -# else - if (meta) -# endif - { - if (keysym == ks_bigfont) - { - change_font (FONT_UP); - return; - } - else if (keysym == ks_smallfont) - { - change_font (FONT_DN); - return; - } - } -#endif - if (TermWin.saveLines) { #ifdef UNSHIFTED_SCROLLKEYS @@ -263,17 +242,21 @@ { unsigned int l; const unsigned char *kbuf0; - const unsigned char ch = C0_ESC; kbuf0 = (Keysym_map[keysym & 0xFF]); l = (unsigned int)*kbuf0++; /* escape prefix */ - if (meta) + if (meta # ifdef META8_OPTION - if (meta_char == C0_ESC) + && meta_char == C0_ESC # endif + ) + { + const unsigned char ch = C0_ESC; tt_write (&ch, 1); + } + tt_write (kbuf0, l); return; } @@ -547,6 +530,7 @@ if (newlen) len = STRLEN (kbuf); } + /* * Pass meta for all function keys, if 'meta' option set */ @@ -571,6 +555,7 @@ for (ch = kbuf; ch < kbuf + len; ch++) *ch |= 0x80; + meta = 0; } #endif @@ -1936,30 +1921,33 @@ /* * Copy display->root pixmap transparency */ - int sx, sy, nx, ny; - unsigned int nw, nh; - Window cr; - XImage *image; - GC gc; - XGCValues gcvalue; + int sx, sy, nx, ny; + unsigned int nw, nh; + Window cr; + XImage *image; + GC gc; + XGCValues gcvalue; XTranslateCoordinates (display->display, TermWin.parent[0], display->root, 0, 0, &sx, &sy, &cr); nw = (unsigned int)szHint.width; nh = (unsigned int)szHint.height; nx = ny = 0; + if (sx < 0) { nw += sx; nx = -sx; sx = 0; } + if (sy < 0) { nh += sy; ny = -sy; sy = 0; } + MIN_IT (nw, (unsigned int) (wrootattr.width - sx)); MIN_IT (nh, (unsigned int) (wrootattr.height - sy)); allowedxerror = -1; @@ -2002,6 +1990,7 @@ am_transparent = am_pixmap_trans = 1; } } + if (!am_pixmap_trans) { unsigned int n; @@ -2026,7 +2015,9 @@ if (oldp != TermWin.parent[i]) pchanged = 1; } + n = 0; + if (pchanged) { for (; n < (unsigned int)i; n++) @@ -2040,6 +2031,7 @@ } } } + if (n > (int) (sizeof (TermWin.parent) / sizeof (TermWin.parent[0]))) { @@ -2072,6 +2064,7 @@ ParentRelative); am_transparent = 1; } + for (; i < (int) (sizeof (TermWin.parent) / sizeof (Window)); i++) TermWin.parent[i] = None; } @@ -2087,7 +2080,7 @@ FILE * rxvt_term::popen_printer () { - FILE *stream = popen (rs[Rs_print_pipe], "w"); + FILE *stream = popen (rs[Rs_print_pipe], "w"); if (stream == NULL) rxvt_print_error ("can't open printer pipe"); @@ -2938,12 +2931,13 @@ * 50 = change font * * rxvt extensions: - * 9 = change locale (NYI) * 10 = menu (may change in future) * 20 = bg pixmap * 39 = change default fg color * 49 = change default bg color * 55 = dump scrollback buffer and all of screen + * 701 = change locale + * 702 = find font */ void rxvt_term::xterm_seq (int op, const char *str, unsigned char resp __attribute__ ((unused))) @@ -3051,12 +3045,14 @@ # ifdef USE_XIM im_cb (); # endif - // TODO: call selection_make with the right values set - // to re-fresh the selection. - if (display->selection_owner == this) - display->set_selection_owner (0); } break; + case XTerm_findfont: + { + int fid = TermWin.fontset->find_font (atoi (str)); + tt_printf ("%d %-.250s\n", fid, (*TermWin.fontset)[fid]->name); + } + break; #endif #if 0 case XTerm_dumpscreen: /* no error notices */ @@ -3195,8 +3191,7 @@ break; case 3: /* 80/132 */ if (PrivateModes & PrivMode_132OK) - set_widthheight ( (unsigned int) ((state ? 132 : 80) * TermWin.fwidth), - (unsigned int)TermWin.height); + set_widthheight (((state ? 132 : 80) * TermWin.fwidth), TermWin.height); break; case 4: /* smooth scrolling */ if (state)