--- rxvt-unicode/src/command.C 2007/06/26 00:40:18 1.332 +++ rxvt-unicode/src/command.C 2007/08/15 22:41:52 1.347 @@ -97,7 +97,6 @@ XK_Shift_Lock, 0x21eb, XK_ISO_Lock, 0x21eb, - XK_ISO_Lock, 0x21eb, XK_Caps_Lock, 0x21ec, XK_Num_Lock, 0x21ed, XK_ISO_Level3_Shift, 0x21ee, @@ -521,7 +520,7 @@ } else { -# if ENABLE_OVERLAY +# if ISO_14755 scr_overlay_off (); # endif iso14755buf = 0; @@ -532,7 +531,7 @@ if (!(iso14755buf & ISO_14755_STARTED)) { iso14755buf |= ISO_14755_STARTED; -# if ENABLE_OVERLAY +# if ISO_14755 scr_overlay_new (0, -1, sizeof ("ISO 14755 mode") - 1, 1); scr_overlay_set (0, 0, "ISO 14755 mode"); # endif @@ -730,7 +729,7 @@ strcpy (kbuf, "\033[1~"); break; -#ifdef XK_KP_End +#ifdef XK_KP_Insert case XK_KP_Insert: /* allow shift to override */ if ((priv_modes & PrivMode_aplKP) ? !shft : shft) @@ -936,7 +935,7 @@ if (iso14755buf) if (iso14755buf & ISO_14755_52) { -# if ENABLE_OVERLAY +# if ISO_14755 scr_overlay_off (); # endif # if ISO_14755 @@ -969,7 +968,7 @@ } else if ((ev.state & (ShiftMask | ControlMask)) != (ShiftMask | ControlMask)) { -# if ENABLE_OVERLAY +# if ISO_14755 scr_overlay_off (); # endif if (iso14755buf & ISO_14755_51) @@ -1437,10 +1436,6 @@ } break; - case MappingNotify: - XRefreshKeyboardMapping (&ev.xmapping); - break; - /* * XXX: this is not the _current_ arrangement * Here's my conclusion: @@ -1490,21 +1485,16 @@ { seen_resize = 1; resize_all_windows (ev.xconfigure.width, ev.xconfigure.height, 1); -#ifdef XPM_BACKGROUND - if (!option (Opt_transparent) && bgPixmap.auto_resize) - { - resize_pixmap (); - scr_touch (true); - } -#endif } - - HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END)); - + else + { #ifdef ENABLE_TRANSPARENCY - if (option (Opt_transparent)) - check_our_parents (); + if (option (Opt_transparent)) + if (bgPixmap.render ()) + scr_touch (false); #endif + } + HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END)); } break; @@ -1582,11 +1572,6 @@ scrollBar.setIdle (); scrollbar_show (0); } - -#ifdef ENABLE_TRANSPARENCY - if (am_transparent && ev.xany.window == parent[0]) - XClearWindow (dpy, ev.xany.window); -#endif } break; @@ -1785,7 +1770,7 @@ if (iso14755buf) { iso14755buf = 0; -# if ENABLE_OVERLAY +# if ISO_14755 scr_overlay_off (); # endif } @@ -1840,14 +1825,12 @@ * if user used some Esetroot compatible prog to set the root bg, * use the property to determine the pixmap. We use it later on. */ - if (ev.xproperty.atom != xa[XA_XROOTPMAP_ID] - && ev.xproperty.atom != xa[XA_ESETROOT_PMAP_ID]) - return; - - /* FALLTHROUGH */ - case ReparentNotify: - if (option (Opt_transparent)) - check_our_parents (); + if (ev.xproperty.atom == xa[XA_XROOTPMAP_ID] + || ev.xproperty.atom == xa[XA_ESETROOT_PMAP_ID]) + { + bgPixmap.set_root_pixmap (); + bgPixmap.render (); + } break; } # endif @@ -2576,7 +2559,7 @@ case 0x9b: /* CSI */ process_csi_seq (); break; - case 0x9d: /* CSI */ + case 0x9d: /* OSC */ process_osc_seq (); break; #endif @@ -2814,8 +2797,8 @@ int n, ndef; int arg[ESC_ARGS]; - for (nargs = ESC_ARGS; nargs > 0;) - arg[--nargs] = 0; + memset (arg, 0, sizeof (arg)); + nargs = 0; priv = 0; ch = cmd_getc (); @@ -2869,7 +2852,7 @@ case '>': if (ch == CSI_DA) /* secondary device attributes */ { - // first parameter is normally 0 for vt100, 1 for some newer vtxxx, 'R' for rxvt, + // first parameter is normally 0 for vt100, 1 for vt220, 'R' for rxvt, // 'U' for rxvt-unicode != 7.[34] (where it was broken). // // second parameter is xterm patch level for xterm, MMmmpp (e.g. 20703) for rxvt @@ -3437,52 +3420,62 @@ process_color_seq (op, Color_IT, str, resp); break; #endif -#if ENABLE_TRANSPARENCY && TINTING +#if ENABLE_TRANSPARENCY case URxvt_Color_tint: process_color_seq (op, Color_tint, str, resp); - - check_our_parents (); - - if (am_transparent) - want_full_refresh = want_refresh = 1; + { + bool changed = false; + if (ISSET_PIXCOLOR (Color_tint)) + changed = bgPixmap.set_tint (pix_colors_focused [Color_tint]); + else + changed = bgPixmap.unset_tint (); + if (changed) + bgPixmap.render (); + } break; #endif - case Rxvt_Pixmap: - { - if (*str != ';') - { #if XPM_BACKGROUND - scale_pixmap (""); /* reset to default scaling */ - set_bgPixmap (str); /* change pixmap */ - scr_touch (true); -#endif - } - - int changed = 0; + case Rxvt_Pixmap: + if (!strcmp (str, "?")) + { + char str[256]; - while ((str = strchr (str, ';')) != NULL) - { - str++; -#if XPM_BACKGROUND - changed += scale_pixmap (str); -#endif - } + sprintf (str, "[%dx%d+%d+%d]", /* can't presume snprintf () ! */ + min (bgPixmap.h_scale, 32767), min (bgPixmap.v_scale, 32767), + min (bgPixmap.h_align, 32767), min (bgPixmap.v_align, 32767)); + process_xterm_seq (XTerm_title, str, CHAR_ST); + } + else + { + int changed = 0; - if (changed) - { -#ifdef XPM_BACKGROUND - resize_pixmap (); - scr_touch (true); -#endif - } -#if ENABLE_TRANSPARENCY && defined(HAVE_AFTERIMAGE) - if (option (Opt_transparent)) - check_our_parents (); -#endif - } + if (*str != ';') + { + /* reset to default scaling :*/ + bgPixmap.unset_geometry (); + if (bgPixmap.set_file (str)) /* change pixmap */ + changed++; + str = strchr (str, ';'); + if (str == NULL) + bgPixmap.set_defaultGeometry (); + } + while (str) + { + str++; + if (bgPixmap.set_geometry (str)) + changed++; + str = strchr (str, ';'); + } + if (changed) + { + bgPixmap.render (); + scr_touch (true); + } + } break; +#endif case Rxvt_restoreFG: set_window_color (Color_fg, str); @@ -3614,12 +3607,10 @@ int state; static const struct - { - const int argval; - const unsigned long bit; - } - - argtopriv[] = { + { + const int argval; + const unsigned long bit; + } argtopriv[] = { { 1, PrivMode_aplCUR }, { 2, PrivMode_vt52 }, { 3, PrivMode_132 },