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.336 by root, Sat Jun 30 18:10:41 2007 UTC vs.
Revision 1.347 by sasha, Wed Aug 15 22:41:52 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,
519# endif 518# endif
520 return; 519 return;
521 } 520 }
522 else 521 else
523 { 522 {
524# if ENABLE_OVERLAY 523# if ISO_14755
525 scr_overlay_off (); 524 scr_overlay_off ();
526# endif 525# endif
527 iso14755buf = 0; 526 iso14755buf = 0;
528 } 527 }
529 } 528 }
530 else if ((ctrl && (keysym == XK_Shift_L || keysym == XK_Shift_R)) 529 else if ((ctrl && (keysym == XK_Shift_L || keysym == XK_Shift_R))
531 || (shft && (keysym == XK_Control_L || keysym == XK_Control_R))) 530 || (shft && (keysym == XK_Control_L || keysym == XK_Control_R)))
532 if (!(iso14755buf & ISO_14755_STARTED)) 531 if (!(iso14755buf & ISO_14755_STARTED))
533 { 532 {
534 iso14755buf |= ISO_14755_STARTED; 533 iso14755buf |= ISO_14755_STARTED;
535# if ENABLE_OVERLAY 534# if ISO_14755
536 scr_overlay_new (0, -1, sizeof ("ISO 14755 mode") - 1, 1); 535 scr_overlay_new (0, -1, sizeof ("ISO 14755 mode") - 1, 1);
537 scr_overlay_set (0, 0, "ISO 14755 mode"); 536 scr_overlay_set (0, 0, "ISO 14755 mode");
538# endif 537# endif
539 } 538 }
540#endif 539#endif
728 727
729 case XK_Find: 728 case XK_Find:
730 strcpy (kbuf, "\033[1~"); 729 strcpy (kbuf, "\033[1~");
731 break; 730 break;
732 731
733#ifdef XK_KP_End 732#ifdef XK_KP_Insert
734 case XK_KP_Insert: 733 case XK_KP_Insert:
735 /* allow shift to override */ 734 /* allow shift to override */
736 if ((priv_modes & PrivMode_aplKP) ? !shft : shft) 735 if ((priv_modes & PrivMode_aplKP) ? !shft : shft)
737 { 736 {
738 strcpy (kbuf, "\033Op"); 737 strcpy (kbuf, "\033Op");
934#if ENABLE_FRILLS || ISO_14755 933#if ENABLE_FRILLS || ISO_14755
935 // ISO 14755 support 934 // ISO 14755 support
936 if (iso14755buf) 935 if (iso14755buf)
937 if (iso14755buf & ISO_14755_52) 936 if (iso14755buf & ISO_14755_52)
938 { 937 {
939# if ENABLE_OVERLAY 938# if ISO_14755
940 scr_overlay_off (); 939 scr_overlay_off ();
941# endif 940# endif
942# if ISO_14755 941# if ISO_14755
943 // iso14755 part 5.2 handling: release time 942 // iso14755 part 5.2 handling: release time
944 // first: controls 943 // first: controls
967 966
968 return; 967 return;
969 } 968 }
970 else if ((ev.state & (ShiftMask | ControlMask)) != (ShiftMask | ControlMask)) 969 else if ((ev.state & (ShiftMask | ControlMask)) != (ShiftMask | ControlMask))
971 { 970 {
972# if ENABLE_OVERLAY 971# if ISO_14755
973 scr_overlay_off (); 972 scr_overlay_off ();
974# endif 973# endif
975 if (iso14755buf & ISO_14755_51) 974 if (iso14755buf & ISO_14755_51)
976 commit_iso14755 (); 975 commit_iso14755 ();
977#if ISO_14755 976#if ISO_14755
1484 1483
1485 if (szHint.width != ev.xconfigure.width || szHint.height != ev.xconfigure.height) 1484 if (szHint.width != ev.xconfigure.width || szHint.height != ev.xconfigure.height)
1486 { 1485 {
1487 seen_resize = 1; 1486 seen_resize = 1;
1488 resize_all_windows (ev.xconfigure.width, ev.xconfigure.height, 1); 1487 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 } 1488 }
1497 1489 else
1490 {
1491#ifdef ENABLE_TRANSPARENCY
1492 if (option (Opt_transparent))
1493 if (bgPixmap.render ())
1494 scr_touch (false);
1495#endif
1496 }
1498 HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END)); 1497 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 } 1498 }
1505 break; 1499 break;
1506 1500
1507 case PropertyNotify: 1501 case PropertyNotify:
1508 if (!HOOK_INVOKE ((this, HOOK_PROPERTY_NOTIFY, DT_XEVENT, &ev, DT_END))) 1502 if (!HOOK_INVOKE ((this, HOOK_PROPERTY_NOTIFY, DT_XEVENT, &ev, DT_END)))
1576 if (isScrollbarWindow (ev.xany.window)) 1570 if (isScrollbarWindow (ev.xany.window))
1577 { 1571 {
1578 scrollBar.setIdle (); 1572 scrollBar.setIdle ();
1579 scrollbar_show (0); 1573 scrollbar_show (0);
1580 } 1574 }
1581
1582#ifdef ENABLE_TRANSPARENCY
1583 if (am_transparent && ev.xany.window == parent[0])
1584 XClearWindow (dpy, ev.xany.window);
1585#endif
1586 } 1575 }
1587 break; 1576 break;
1588 1577
1589 case MotionNotify: 1578 case MotionNotify:
1590#ifdef POINTER_BLANK 1579#ifdef POINTER_BLANK
1779 1768
1780#if ENABLE_FRILLS || ISO_14755 1769#if ENABLE_FRILLS || ISO_14755
1781 if (iso14755buf) 1770 if (iso14755buf)
1782 { 1771 {
1783 iso14755buf = 0; 1772 iso14755buf = 0;
1784# if ENABLE_OVERLAY 1773# if ISO_14755
1785 scr_overlay_off (); 1774 scr_overlay_off ();
1786# endif 1775# endif
1787 } 1776 }
1788#endif 1777#endif
1789#if USE_XIM 1778#if USE_XIM
1834 case PropertyNotify: 1823 case PropertyNotify:
1835 /* 1824 /*
1836 * if user used some Esetroot compatible prog to set the root bg, 1825 * 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. 1826 * use the property to determine the pixmap. We use it later on.
1838 */ 1827 */
1839 if (ev.xproperty.atom != xa[XA_XROOTPMAP_ID] 1828 if (ev.xproperty.atom == xa[XA_XROOTPMAP_ID]
1840 && ev.xproperty.atom != xa[XA_ESETROOT_PMAP_ID]) 1829 || ev.xproperty.atom == xa[XA_ESETROOT_PMAP_ID])
1841 return; 1830 {
1842 1831 bgPixmap.set_root_pixmap ();
1843 /* FALLTHROUGH */ 1832 bgPixmap.render ();
1844 case ReparentNotify: 1833 }
1845 if (option (Opt_transparent))
1846 check_our_parents ();
1847 break; 1834 break;
1848 } 1835 }
1849# endif 1836# endif
1850} 1837}
1851#endif 1838#endif
3431 break; 3418 break;
3432 case URxvt_Color_IT: 3419 case URxvt_Color_IT:
3433 process_color_seq (op, Color_IT, str, resp); 3420 process_color_seq (op, Color_IT, str, resp);
3434 break; 3421 break;
3435#endif 3422#endif
3436#if ENABLE_TRANSPARENCY && TINTING 3423#if ENABLE_TRANSPARENCY
3437 case URxvt_Color_tint: 3424 case URxvt_Color_tint:
3438 process_color_seq (op, Color_tint, str, resp); 3425 process_color_seq (op, Color_tint, str, resp);
3426 {
3427 bool changed = false;
3428 if (ISSET_PIXCOLOR (Color_tint))
3429 changed = bgPixmap.set_tint (pix_colors_focused [Color_tint]);
3430 else
3431 changed = bgPixmap.unset_tint ();
3432 if (changed)
3433 bgPixmap.render ();
3434 }
3439 3435
3440 check_our_parents ();
3441
3442 if (am_transparent)
3443 want_full_refresh = want_refresh = 1;
3444
3445 break; 3436 break;
3446#endif 3437#endif
3447 3438
3439#if XPM_BACKGROUND
3448 case Rxvt_Pixmap: 3440 case Rxvt_Pixmap:
3441 if (!strcmp (str, "?"))
3449 { 3442 {
3443 char str[256];
3444
3445 sprintf (str, "[%dx%d+%d+%d]", /* can't presume snprintf () ! */
3446 min (bgPixmap.h_scale, 32767), min (bgPixmap.v_scale, 32767),
3447 min (bgPixmap.h_align, 32767), min (bgPixmap.v_align, 32767));
3448 process_xterm_seq (XTerm_title, str, CHAR_ST);
3449 }
3450 else
3451 {
3452 int changed = 0;
3453
3450 if (*str != ';') 3454 if (*str != ';')
3451 { 3455 {
3452#if XPM_BACKGROUND
3453 scale_pixmap (""); /* reset to default scaling */ 3456 /* reset to default scaling :*/
3457 bgPixmap.unset_geometry ();
3454 set_bgPixmap (str); /* change pixmap */ 3458 if (bgPixmap.set_file (str)) /* change pixmap */
3459 changed++;
3460 str = strchr (str, ';');
3461 if (str == NULL)
3462 bgPixmap.set_defaultGeometry ();
3463 }
3464 while (str)
3465 {
3466 str++;
3467 if (bgPixmap.set_geometry (str))
3468 changed++;
3469 str = strchr (str, ';');
3470 }
3471 if (changed)
3472 {
3473 bgPixmap.render ();
3455 scr_touch (true); 3474 scr_touch (true);
3456#endif
3457 } 3475 }
3458
3459 int changed = 0;
3460
3461 while ((str = strchr (str, ';')) != NULL)
3462 {
3463 str++;
3464#if XPM_BACKGROUND
3465 changed += scale_pixmap (str);
3466#endif
3467 } 3476 }
3468
3469 if (changed)
3470 {
3471#ifdef XPM_BACKGROUND
3472 resize_pixmap ();
3473 scr_touch (true);
3474#endif
3475 }
3476#if ENABLE_TRANSPARENCY && defined(HAVE_AFTERIMAGE)
3477 if (option (Opt_transparent))
3478 check_our_parents ();
3479#endif
3480 }
3481 break; 3477 break;
3478#endif
3482 3479
3483 case Rxvt_restoreFG: 3480 case Rxvt_restoreFG:
3484 set_window_color (Color_fg, str); 3481 set_window_color (Color_fg, str);
3485 break; 3482 break;
3486 case Rxvt_restoreBG: 3483 case Rxvt_restoreBG:
3608{ 3605{
3609 unsigned int i, j; 3606 unsigned int i, j;
3610 int state; 3607 int state;
3611 3608
3612 static const struct 3609 static const struct
3613 { 3610 {
3614 const int argval; 3611 const int argval;
3615 const unsigned long bit; 3612 const unsigned long bit;
3616 }
3617
3618 argtopriv[] = { 3613 } argtopriv[] = {
3619 { 1, PrivMode_aplCUR }, 3614 { 1, PrivMode_aplCUR },
3620 { 2, PrivMode_vt52 }, 3615 { 2, PrivMode_vt52 },
3621 { 3, PrivMode_132 }, 3616 { 3, PrivMode_132 },
3622 { 4, PrivMode_smoothScroll }, 3617 { 4, PrivMode_smoothScroll },
3623 { 5, PrivMode_rVideo }, 3618 { 5, PrivMode_rVideo },

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines