ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/command.C
(Generate patch)

Comparing rxvt-unicode/src/command.C (file contents):
Revision 1.338 by ayin, Tue Jul 31 17:39:39 2007 UTC vs.
Revision 1.351 by ayin, Sun Sep 9 10:14:40 2007 UTC

95 XK_Shift_L, 0x21e7, 95 XK_Shift_L, 0x21e7,
96 XK_Shift_R, 0x21e7, 96 XK_Shift_R, 0x21e7,
97 97
98 XK_Shift_Lock, 0x21eb, 98 XK_Shift_Lock, 0x21eb,
99 XK_ISO_Lock, 0x21eb, 99 XK_ISO_Lock, 0x21eb,
100 XK_ISO_Lock, 0x21eb,
101 XK_Caps_Lock, 0x21ec, 100 XK_Caps_Lock, 0x21ec,
102 XK_Num_Lock, 0x21ed, 101 XK_Num_Lock, 0x21ed,
103 XK_ISO_Level3_Shift, 0x21ee, 102 XK_ISO_Level3_Shift, 0x21ee,
104 XK_ISO_Level3_Lock, 0x21ef, 103 XK_ISO_Level3_Lock, 0x21ef,
105 XK_ISO_Group_Lock, 0x21f0, 104 XK_ISO_Group_Lock, 0x21f0,
560 kbuf[0] = (!! (priv_modes & PrivMode_BackSpace) 559 kbuf[0] = (!! (priv_modes & PrivMode_BackSpace)
561 ^ !!ctrl) ? '\b' : '\177'; 560 ^ !!ctrl) ? '\b' : '\177';
562 kbuf[1] = '\0'; 561 kbuf[1] = '\0';
563 } 562 }
564 else 563 else
565 strcpy (kbuf, key_backspace); 564 strcpy (kbuf, rs[Rs_backspace_key]);
566 break; 565 break;
567#endif 566#endif
568#ifndef NO_DELETE_KEY 567#ifndef NO_DELETE_KEY
569# ifdef XK_KP_Prior 568# ifdef XK_KP_Delete
570 case XK_KP_Delete: 569 case XK_KP_Delete:
571 /* allow shift to override */ 570 /* allow shift to override */
572 if ((priv_modes & PrivMode_aplKP) ? !shft : shft) 571 if ((priv_modes & PrivMode_aplKP) ? !shft : shft)
573 { 572 {
574 strcpy (kbuf, "\033On"); 573 strcpy (kbuf, "\033On");
575 break; 574 break;
576 } 575 }
577 /* FALLTHROUGH */ 576 /* FALLTHROUGH */
578# endif 577# endif
579 case XK_Delete: 578 case XK_Delete:
580 strcpy (kbuf, key_delete); 579 strcpy (kbuf, rs[Rs_delete_key]);
581 break; 580 break;
582#endif 581#endif
583 case XK_Tab: 582 case XK_Tab:
584 if (shft) 583 if (shft)
585 strcpy (kbuf, "\033[Z"); 584 strcpy (kbuf, "\033[Z");
1475 && ev.xfocus.mode != NotifyGrab) 1474 && ev.xfocus.mode != NotifyGrab)
1476 focus_out (); 1475 focus_out ();
1477 break; 1476 break;
1478 1477
1479 case ConfigureNotify: 1478 case ConfigureNotify:
1479/* fprintf (stderr, "ConfigureNotify for %X, parent is %X, geom is %dx%d%+d%+d, old geom was %dx%d\n",
1480 ev.xconfigure.window, parent[0], ev.xconfigure.width, ev.xconfigure.height, ev.xconfigure.x, ev.xconfigure.y,
1481 szHint.width, szHint.height);*/
1480 if (ev.xconfigure.window == parent[0]) 1482 if (ev.xconfigure.window == parent[0])
1481 { 1483 {
1482 while (XCheckTypedWindowEvent (dpy, ev.xconfigure.window, ConfigureNotify, &ev)) 1484 while (XCheckTypedWindowEvent (dpy, ev.xconfigure.window, ConfigureNotify, &ev))
1483 ; 1485 ;
1484 1486
1485 if (szHint.width != ev.xconfigure.width || szHint.height != ev.xconfigure.height) 1487 if (szHint.width != ev.xconfigure.width || szHint.height != ev.xconfigure.height)
1486 { 1488 {
1487 seen_resize = 1; 1489 seen_resize = 1;
1488 resize_all_windows (ev.xconfigure.width, ev.xconfigure.height, 1); 1490 resize_all_windows (ev.xconfigure.width, ev.xconfigure.height, 1);
1489#ifdef XPM_BACKGROUND
1490 if (!option (Opt_transparent) && bgPixmap.auto_resize)
1491 {
1492 resize_pixmap ();
1493 scr_touch (true);
1494 }
1495#endif
1496 } 1491 }
1497 1492 else
1493 {
1494#ifdef ENABLE_TRANSPARENCY
1495 if (option (Opt_transparent))
1496 update_background ();
1497#endif
1498 }
1498 HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END)); 1499 HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END));
1499
1500#ifdef ENABLE_TRANSPARENCY
1501 if (option (Opt_transparent))
1502 check_our_parents ();
1503#endif
1504 } 1500 }
1505 break; 1501 break;
1506 1502
1507 case PropertyNotify: 1503 case PropertyNotify:
1508 if (!HOOK_INVOKE ((this, HOOK_PROPERTY_NOTIFY, DT_XEVENT, &ev, DT_END))) 1504 if (!HOOK_INVOKE ((this, HOOK_PROPERTY_NOTIFY, DT_XEVENT, &ev, DT_END)))
1576 if (isScrollbarWindow (ev.xany.window)) 1572 if (isScrollbarWindow (ev.xany.window))
1577 { 1573 {
1578 scrollBar.setIdle (); 1574 scrollBar.setIdle ();
1579 scrollbar_show (0); 1575 scrollbar_show (0);
1580 } 1576 }
1581
1582#ifdef ENABLE_TRANSPARENCY
1583 if (am_transparent && ev.xany.window == parent[0])
1584 XClearWindow (dpy, ev.xany.window);
1585#endif
1586 } 1577 }
1587 break; 1578 break;
1588 1579
1589 case MotionNotify: 1580 case MotionNotify:
1590#ifdef POINTER_BLANK 1581#ifdef POINTER_BLANK
1834 case PropertyNotify: 1825 case PropertyNotify:
1835 /* 1826 /*
1836 * if user used some Esetroot compatible prog to set the root bg, 1827 * if user used some Esetroot compatible prog to set the root bg,
1837 * use the property to determine the pixmap. We use it later on. 1828 * use the property to determine the pixmap. We use it later on.
1838 */ 1829 */
1839 if (ev.xproperty.atom != xa[XA_XROOTPMAP_ID] 1830 if (ev.xproperty.atom == xa[XA_XROOTPMAP_ID]
1840 && ev.xproperty.atom != xa[XA_ESETROOT_PMAP_ID]) 1831 || ev.xproperty.atom == xa[XA_ESETROOT_PMAP_ID])
1841 return; 1832 {
1842 1833 bgPixmap.set_root_pixmap ();
1843 /* FALLTHROUGH */ 1834 update_background ();
1844 case ReparentNotify: 1835 }
1845 if (option (Opt_transparent))
1846 check_our_parents ();
1847 break; 1836 break;
1848 } 1837 }
1849# endif 1838# endif
1850} 1839}
1851#endif 1840#endif
2806rxvt_term::process_csi_seq () 2795rxvt_term::process_csi_seq ()
2807{ 2796{
2808 unicode_t ch, priv, i; 2797 unicode_t ch, priv, i;
2809 unsigned int nargs, p; 2798 unsigned int nargs, p;
2810 int n, ndef; 2799 int n, ndef;
2811 int arg[ESC_ARGS]; 2800 int arg[ESC_ARGS] = { };
2812 2801
2813 memset (arg, 0, sizeof (arg));
2814 nargs = 0; 2802 nargs = 0;
2815 2803
2816 priv = 0; 2804 priv = 0;
2817 ch = cmd_getc (); 2805 ch = cmd_getc ();
2818 if (ch >= '<' && ch <= '?') 2806 if (ch >= '<' && ch <= '?')
3431 break; 3419 break;
3432 case URxvt_Color_IT: 3420 case URxvt_Color_IT:
3433 process_color_seq (op, Color_IT, str, resp); 3421 process_color_seq (op, Color_IT, str, resp);
3434 break; 3422 break;
3435#endif 3423#endif
3436#if ENABLE_TRANSPARENCY && TINTING 3424#if ENABLE_TRANSPARENCY
3437 case URxvt_Color_tint: 3425 case URxvt_Color_tint:
3438 process_color_seq (op, Color_tint, str, resp); 3426 process_color_seq (op, Color_tint, str, resp);
3427 {
3428 bool changed = false;
3429 if (ISSET_PIXCOLOR (Color_tint))
3430 changed = bgPixmap.set_tint (pix_colors_focused [Color_tint]);
3431 else
3432 changed = bgPixmap.unset_tint ();
3433 if (changed)
3434 update_background ();
3435 }
3439 3436
3440 check_our_parents ();
3441
3442 if (am_transparent)
3443 want_full_refresh = want_refresh = 1;
3444
3445 break; 3437 break;
3446#endif 3438#endif
3447 3439
3440#if XPM_BACKGROUND
3448 case Rxvt_Pixmap: 3441 case Rxvt_Pixmap:
3449 { 3442 if (!strcmp (str, "?"))
3450 if (*str != ';')
3451 { 3443 {
3452#if XPM_BACKGROUND 3444 char str[256];
3453 scale_pixmap (""); /* reset to default scaling */ 3445
3454 set_bgPixmap (str); /* change pixmap */ 3446 sprintf (str, "[%dx%d+%d+%d]", /* can't presume snprintf () ! */
3455 scr_touch (true); 3447 min (bgPixmap.h_scale, 32767), min (bgPixmap.v_scale, 32767),
3456#endif 3448 min (bgPixmap.h_align, 32767), min (bgPixmap.v_align, 32767));
3449 process_xterm_seq (XTerm_title, str, CHAR_ST);
3457 } 3450 }
3458 3451 else
3452 {
3459 int changed = 0; 3453 int changed = 0;
3460 3454
3461 while ((str = strchr (str, ';')) != NULL) 3455 if (*str != ';')
3462 { 3456 {
3457 /* reset to default scaling :*/
3458 bgPixmap.unset_geometry ();
3459 if (bgPixmap.set_file (str)) /* change pixmap */
3460 changed++;
3461 str = strchr (str, ';');
3462 if (str == NULL)
3463 bgPixmap.set_defaultGeometry ();
3464 }
3465 while (str)
3466 {
3463 str++; 3467 str++;
3464#if XPM_BACKGROUND 3468 if (bgPixmap.set_geometry (str))
3465 changed += scale_pixmap (str); 3469 changed++;
3466#endif 3470 str = strchr (str, ';');
3467 } 3471 }
3468
3469 if (changed) 3472 if (changed)
3470 { 3473 update_background ();
3471#ifdef XPM_BACKGROUND
3472 resize_pixmap ();
3473 scr_touch (true);
3474#endif
3475 } 3474 }
3476#if ENABLE_TRANSPARENCY && defined(HAVE_AFTERIMAGE)
3477 if (option (Opt_transparent))
3478 check_our_parents ();
3479#endif
3480 }
3481 break; 3475 break;
3476#endif
3482 3477
3483 case Rxvt_restoreFG: 3478 case Rxvt_restoreFG:
3484 set_window_color (Color_fg, str); 3479 set_window_color (Color_fg, str);
3485 break; 3480 break;
3486 case Rxvt_restoreBG: 3481 case Rxvt_restoreBG:
3608{ 3603{
3609 unsigned int i, j; 3604 unsigned int i, j;
3610 int state; 3605 int state;
3611 3606
3612 static const struct 3607 static const struct
3613 { 3608 {
3614 const int argval; 3609 const int argval;
3615 const unsigned long bit; 3610 const unsigned long bit;
3616 }
3617
3618 argtopriv[] = { 3611 } argtopriv[] = {
3619 { 1, PrivMode_aplCUR }, 3612 { 1, PrivMode_aplCUR },
3620 { 2, PrivMode_vt52 }, 3613 { 2, PrivMode_vt52 },
3621 { 3, PrivMode_132 }, 3614 { 3, PrivMode_132 },
3622 { 4, PrivMode_smoothScroll }, 3615 { 4, PrivMode_smoothScroll },
3623 { 5, PrivMode_rVideo }, 3616 { 5, PrivMode_rVideo },

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines