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.332 by root, Tue Jun 26 00:40:18 2007 UTC vs.
Revision 1.359 by ayin, Mon Oct 15 14:56:06 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
548#endif 547#endif
549 548
550 if (keysym >= 0xFF00 && keysym <= 0xFFFF) 549 if (keysym >= 0xFF00 && keysym <= 0xFFFF)
551 { 550 {
552 { 551 {
552 bool kp = priv_modes & PrivMode_aplKP ? !shft : shft;
553 newlen = 1; 553 newlen = 1;
554 switch (keysym) 554 switch (keysym)
555 { 555 {
556#ifndef NO_BACKSPACE_KEY 556#ifndef NO_BACKSPACE_KEY
557 case XK_BackSpace: 557 case XK_BackSpace:
560 kbuf[0] = (!! (priv_modes & PrivMode_BackSpace) 560 kbuf[0] = (!! (priv_modes & PrivMode_BackSpace)
561 ^ !!ctrl) ? '\b' : '\177'; 561 ^ !!ctrl) ? '\b' : '\177';
562 kbuf[1] = '\0'; 562 kbuf[1] = '\0';
563 } 563 }
564 else 564 else
565 strcpy (kbuf, key_backspace); 565 strcpy (kbuf, rs[Rs_backspace_key]);
566 break; 566 break;
567#endif 567#endif
568#ifndef NO_DELETE_KEY 568#ifndef NO_DELETE_KEY
569# ifdef XK_KP_Prior 569# ifdef XK_KP_Delete
570 case XK_KP_Delete: 570 case XK_KP_Delete:
571 /* allow shift to override */ 571 /* allow shift to override */
572 if ((priv_modes & PrivMode_aplKP) ? !shft : shft) 572 if (kp)
573 { 573 {
574 strcpy (kbuf, "\033On"); 574 strcpy (kbuf, "\033On");
575 break; 575 break;
576 } 576 }
577 /* FALLTHROUGH */ 577 /* FALLTHROUGH */
578# endif 578# endif
579 case XK_Delete: 579 case XK_Delete:
580 strcpy (kbuf, key_delete); 580 strcpy (kbuf, rs[Rs_delete_key]);
581 break; 581 break;
582#endif 582#endif
583 case XK_Tab: 583 case XK_Tab:
584 if (shft) 584 if (shft)
585 strcpy (kbuf, "\033[Z"); 585 strcpy (kbuf, "\033[Z");
600#ifdef XK_KP_Left 600#ifdef XK_KP_Left
601 case XK_KP_Up: /* \033Ox or standard */ 601 case XK_KP_Up: /* \033Ox or standard */
602 case XK_KP_Down: /* \033Or or standard */ 602 case XK_KP_Down: /* \033Or or standard */
603 case XK_KP_Right: /* \033Ov or standard */ 603 case XK_KP_Right: /* \033Ov or standard */
604 case XK_KP_Left: /* \033Ot or standard */ 604 case XK_KP_Left: /* \033Ot or standard */
605 if ((priv_modes & PrivMode_aplKP) ? !shft : shft) 605 if (kp)
606 { 606 {
607 strcpy (kbuf, "\033OZ"); 607 strcpy (kbuf, "\033OZ");
608 kbuf[2] = "txvr"[keysym - XK_KP_Left]; 608 kbuf[2] = "txvr"[keysym - XK_KP_Left];
609 break; 609 break;
610 } 610 }
633 633
634#ifndef UNSHIFTED_SCROLLKEYS 634#ifndef UNSHIFTED_SCROLLKEYS
635# ifdef XK_KP_Prior 635# ifdef XK_KP_Prior
636 case XK_KP_Prior: 636 case XK_KP_Prior:
637 /* allow shift to override */ 637 /* allow shift to override */
638 if ((priv_modes & PrivMode_aplKP) ? !shft : shft) 638 if (kp)
639 { 639 {
640 strcpy (kbuf, "\033Oy"); 640 strcpy (kbuf, "\033Oy");
641 break; 641 break;
642 } 642 }
643 /* FALLTHROUGH */ 643 /* FALLTHROUGH */
646 strcpy (kbuf, "\033[5~"); 646 strcpy (kbuf, "\033[5~");
647 break; 647 break;
648# ifdef XK_KP_Next 648# ifdef XK_KP_Next
649 case XK_KP_Next: 649 case XK_KP_Next:
650 /* allow shift to override */ 650 /* allow shift to override */
651 if ((priv_modes & PrivMode_aplKP) ? !shft : shft) 651 if (kp)
652 { 652 {
653 strcpy (kbuf, "\033Os"); 653 strcpy (kbuf, "\033Os");
654 break; 654 break;
655 } 655 }
656 /* FALLTHROUGH */ 656 /* FALLTHROUGH */
659 strcpy (kbuf, "\033[6~"); 659 strcpy (kbuf, "\033[6~");
660 break; 660 break;
661#endif 661#endif
662 case XK_KP_Enter: 662 case XK_KP_Enter:
663 /* allow shift to override */ 663 /* allow shift to override */
664 if ((priv_modes & PrivMode_aplKP) ? !shft : shft) 664 if (kp)
665 { 665 {
666 strcpy (kbuf, "\033OM"); 666 strcpy (kbuf, "\033OM");
667 break; 667 break;
668 } 668 }
669 669
712 case XK_KP_6: /* "\033Ov" : "6" */ 712 case XK_KP_6: /* "\033Ov" : "6" */
713 case XK_KP_7: /* "\033Ow" : "7" */ 713 case XK_KP_7: /* "\033Ow" : "7" */
714 case XK_KP_8: /* "\033Ox" : "8" */ 714 case XK_KP_8: /* "\033Ox" : "8" */
715 case XK_KP_9: /* "\033Oy" : "9" */ 715 case XK_KP_9: /* "\033Oy" : "9" */
716 /* allow shift to override */ 716 /* allow shift to override */
717 if ((priv_modes & PrivMode_aplKP) ? !shft : shft) 717 if (kp)
718 { 718 {
719 strcpy (kbuf, "\033Oj"); 719 strcpy (kbuf, "\033Oj");
720 kbuf[2] += (keysym - XK_KP_Multiply); 720 kbuf[2] += (keysym - XK_KP_Multiply);
721 } 721 }
722 else 722 else
728 728
729 case XK_Find: 729 case XK_Find:
730 strcpy (kbuf, "\033[1~"); 730 strcpy (kbuf, "\033[1~");
731 break; 731 break;
732 732
733#ifdef XK_KP_End 733#ifdef XK_KP_Insert
734 case XK_KP_Insert: 734 case XK_KP_Insert:
735 /* allow shift to override */ 735 /* allow shift to override */
736 if ((priv_modes & PrivMode_aplKP) ? !shft : shft) 736 if (kp)
737 { 737 {
738 strcpy (kbuf, "\033Op"); 738 strcpy (kbuf, "\033Op");
739 break; 739 break;
740 } 740 }
741 /* FALLTHROUGH */ 741 /* FALLTHROUGH */
754 strcpy (kbuf, "\033[4~"); 754 strcpy (kbuf, "\033[4~");
755 break; 755 break;
756#ifdef XK_KP_End 756#ifdef XK_KP_End
757 case XK_KP_End: 757 case XK_KP_End:
758 /* allow shift to override */ 758 /* allow shift to override */
759 if ((priv_modes & PrivMode_aplKP) ? !shft : shft) 759 if (kp)
760 { 760 {
761 strcpy (kbuf, "\033Oq"); 761 strcpy (kbuf, "\033Oq");
762 break; 762 break;
763 } 763 }
764 /* FALLTHROUGH */ 764 /* FALLTHROUGH */
767 strcpy (kbuf, KS_END); 767 strcpy (kbuf, KS_END);
768 break; 768 break;
769#ifdef XK_KP_Home 769#ifdef XK_KP_Home
770 case XK_KP_Home: 770 case XK_KP_Home:
771 /* allow shift to override */ 771 /* allow shift to override */
772 if ((priv_modes & PrivMode_aplKP) ? !shft : shft) 772 if (kp)
773 { 773 {
774 strcpy (kbuf, "\033Ow"); 774 strcpy (kbuf, "\033Ow");
775 break; 775 break;
776 } 776 }
777 /* FALLTHROUGH */ 777 /* FALLTHROUGH */
934#if ENABLE_FRILLS || ISO_14755 934#if ENABLE_FRILLS || ISO_14755
935 // ISO 14755 support 935 // ISO 14755 support
936 if (iso14755buf) 936 if (iso14755buf)
937 if (iso14755buf & ISO_14755_52) 937 if (iso14755buf & ISO_14755_52)
938 { 938 {
939# if ENABLE_OVERLAY 939# if ISO_14755
940 scr_overlay_off (); 940 scr_overlay_off ();
941# endif 941# endif
942# if ISO_14755 942# if ISO_14755
943 // iso14755 part 5.2 handling: release time 943 // iso14755 part 5.2 handling: release time
944 // first: controls 944 // first: controls
967 967
968 return; 968 return;
969 } 969 }
970 else if ((ev.state & (ShiftMask | ControlMask)) != (ShiftMask | ControlMask)) 970 else if ((ev.state & (ShiftMask | ControlMask)) != (ShiftMask | ControlMask))
971 { 971 {
972# if ENABLE_OVERLAY 972# if ISO_14755
973 scr_overlay_off (); 973 scr_overlay_off ();
974# endif 974# endif
975 if (iso14755buf & ISO_14755_51) 975 if (iso14755buf & ISO_14755_51)
976 commit_iso14755 (); 976 commit_iso14755 ();
977#if ISO_14755 977#if ISO_14755
1034 1034
1035void 1035void
1036rxvt_term::flush () 1036rxvt_term::flush ()
1037{ 1037{
1038 flush_ev.stop (); 1038 flush_ev.stop ();
1039 1039
1040#ifdef ENABLE_TRANSPARENCY 1040#ifdef HAVE_BG_PIXMAP
1041 if (want_full_refresh) 1041 if (bgPixmap.check_clearChanged ())
1042 { 1042 {
1043 want_full_refresh = 0; 1043// scr_clear (true); This needs to be researched further!
1044 scr_clear ();
1045 scr_touch (false); 1044 scr_touch (false);
1046 } 1045 }
1047#endif 1046#endif
1048 1047
1049 if (want_refresh) 1048 if (want_refresh)
1303rxvt_term::mouse_report (XButtonEvent &ev) 1302rxvt_term::mouse_report (XButtonEvent &ev)
1304{ 1303{
1305 int button_number, key_state = 0; 1304 int button_number, key_state = 0;
1306 int x, y; 1305 int x, y;
1307 1306
1308 x = ev.x; 1307 x = Pixel2Col (ev.x);
1309 y = ev.y; 1308 y = Pixel2Row (ev.y);
1310 pixel_position (&x, &y);
1311 1309
1312 if (MEvent.button == AnyButton) 1310 if (MEvent.button == AnyButton)
1313 button_number = 3; 1311 button_number = 3;
1314 else 1312 else
1315 { 1313 {
1433 else if (ev.xclient.data.l[1] == XEMBED_FOCUS_OUT) 1431 else if (ev.xclient.data.l[1] == XEMBED_FOCUS_OUT)
1434 focus_out (); 1432 focus_out ();
1435 } 1433 }
1436#endif 1434#endif
1437 } 1435 }
1438 break;
1439
1440 case MappingNotify:
1441 XRefreshKeyboardMapping (&ev.xmapping);
1442 break; 1436 break;
1443 1437
1444 /* 1438 /*
1445 * XXX: this is not the _current_ arrangement 1439 * XXX: this is not the _current_ arrangement
1446 * Here's my conclusion: 1440 * Here's my conclusion:
1479 && ev.xfocus.mode != NotifyGrab) 1473 && ev.xfocus.mode != NotifyGrab)
1480 focus_out (); 1474 focus_out ();
1481 break; 1475 break;
1482 1476
1483 case ConfigureNotify: 1477 case ConfigureNotify:
1478 /* fprintf (stderr, "ConfigureNotify for %X, parent is %X, geom is %dx%d%+d%+d, old geom was %dx%d\n",
1479 ev.xconfigure.window, parent[0], ev.xconfigure.width, ev.xconfigure.height, ev.xconfigure.x, ev.xconfigure.y,
1480 szHint.width, szHint.height); */
1484 if (ev.xconfigure.window == parent[0]) 1481 if (ev.xconfigure.window == parent[0])
1485 { 1482 {
1486 while (XCheckTypedWindowEvent (dpy, ev.xconfigure.window, ConfigureNotify, &ev)) 1483 while (XCheckTypedWindowEvent (dpy, ev.xconfigure.window, ConfigureNotify, &ev))
1487 ; 1484 ;
1488 1485
1489 if (szHint.width != ev.xconfigure.width || szHint.height != ev.xconfigure.height) 1486 if (szHint.width != ev.xconfigure.width || szHint.height != ev.xconfigure.height)
1490 { 1487 {
1491 seen_resize = 1; 1488 seen_resize = 1;
1492 resize_all_windows (ev.xconfigure.width, ev.xconfigure.height, 1); 1489 resize_all_windows (ev.xconfigure.width, ev.xconfigure.height, 1);
1493#ifdef XPM_BACKGROUND
1494 if (!option (Opt_transparent) && bgPixmap.auto_resize)
1495 {
1496 resize_pixmap ();
1497 scr_touch (true);
1498 }
1499#endif
1500 } 1490 }
1501 1491 else
1492 {
1493#ifdef HAVE_BG_PIXMAP
1494 if (bgPixmap.window_position_sensitive ())
1495 update_background ();
1496#endif
1497 }
1502 HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END)); 1498 HOOK_INVOKE ((this, HOOK_CONFIGURE_NOTIFY, DT_XEVENT, &ev, DT_END));
1503
1504#ifdef ENABLE_TRANSPARENCY
1505 if (option (Opt_transparent))
1506 check_our_parents ();
1507#endif
1508 } 1499 }
1509 break; 1500 break;
1510 1501
1511 case PropertyNotify: 1502 case PropertyNotify:
1512 if (!HOOK_INVOKE ((this, HOOK_PROPERTY_NOTIFY, DT_XEVENT, &ev, DT_END))) 1503 if (!HOOK_INVOKE ((this, HOOK_PROPERTY_NOTIFY, DT_XEVENT, &ev, DT_END)))
1543 text_blink_ev.stop (); 1534 text_blink_ev.stop ();
1544#endif 1535#endif
1545 HOOK_INVOKE ((this, HOOK_UNMAP_NOTIFY, DT_XEVENT, &ev, DT_END)); 1536 HOOK_INVOKE ((this, HOOK_UNMAP_NOTIFY, DT_XEVENT, &ev, DT_END));
1546 break; 1537 break;
1547 1538
1548#ifdef ENABLE_TRANSPARENCY
1549 case ReparentNotify:
1550 rootwin_cb (ev);
1551 break;
1552#endif /* ENABLE_TRANSPARENCY */
1553
1554 case GraphicsExpose: 1539 case GraphicsExpose:
1555 case Expose: 1540 case Expose:
1556 if (ev.xany.window == vt) 1541 if (ev.xany.window == vt)
1557 { 1542 {
1558 do 1543 do
1544 {
1559 scr_expose (ev.xexpose.x, ev.xexpose.y, 1545 scr_expose (ev.xexpose.x, ev.xexpose.y,
1560 ev.xexpose.width, ev.xexpose.height, False); 1546 ev.xexpose.width, ev.xexpose.height, False);
1547 }
1561 while (XCheckTypedWindowEvent (dpy, vt, ev.xany.type, &ev)); 1548 while (XCheckTypedWindowEvent (dpy, vt, ev.xany.type, &ev));
1562 1549
1563 ev.xany.type = ev.xany.type == Expose ? GraphicsExpose : Expose; 1550 ev.xany.type = ev.xany.type == Expose ? GraphicsExpose : Expose;
1564 1551
1565 while (XCheckTypedWindowEvent (dpy, vt, ev.xany.type, &ev)) 1552 while (XCheckTypedWindowEvent (dpy, vt, ev.xany.type, &ev))
1553 {
1566 scr_expose (ev.xexpose.x, ev.xexpose.y, 1554 scr_expose (ev.xexpose.x, ev.xexpose.y,
1567 ev.xexpose.width, ev.xexpose.height, False); 1555 ev.xexpose.width, ev.xexpose.height, False);
1568 1556 }
1569 want_refresh = 1; 1557 want_refresh = 1;
1570 } 1558 }
1571 else 1559 else
1572 { 1560 {
1573 XEvent unused_event; 1561 XEvent unused_event;
1580 if (isScrollbarWindow (ev.xany.window)) 1568 if (isScrollbarWindow (ev.xany.window))
1581 { 1569 {
1582 scrollBar.setIdle (); 1570 scrollBar.setIdle ();
1583 scrollbar_show (0); 1571 scrollbar_show (0);
1584 } 1572 }
1585
1586#ifdef ENABLE_TRANSPARENCY
1587 if (am_transparent && ev.xany.window == parent[0])
1588 XClearWindow (dpy, ev.xany.window);
1589#endif
1590 } 1573 }
1591 break; 1574 break;
1592 1575
1593 case MotionNotify: 1576 case MotionNotify:
1594#ifdef POINTER_BLANK 1577#ifdef POINTER_BLANK
1756 } 1739 }
1757#endif 1740#endif
1758#if ENABLE_FRILLS 1741#if ENABLE_FRILLS
1759 if (option (Opt_urgentOnBell)) 1742 if (option (Opt_urgentOnBell))
1760 { 1743 {
1761 XWMHints *h;
1762
1763 h = XGetWMHints(dpy, parent[0]); 1744 if (XWMHints *h = XGetWMHints(dpy, parent[0]))
1764 if (h != NULL)
1765 { 1745 {
1766 h->flags &= ~XUrgencyHint; 1746 h->flags &= ~XUrgencyHint;
1767 XSetWMHints(dpy, parent[0], h); 1747 XSetWMHints (dpy, parent[0], h);
1768 } 1748 }
1769 } 1749 }
1770#endif 1750#endif
1771 } 1751 }
1772} 1752}
1783 1763
1784#if ENABLE_FRILLS || ISO_14755 1764#if ENABLE_FRILLS || ISO_14755
1785 if (iso14755buf) 1765 if (iso14755buf)
1786 { 1766 {
1787 iso14755buf = 0; 1767 iso14755buf = 0;
1788# if ENABLE_OVERLAY 1768# if ISO_14755
1789 scr_overlay_off (); 1769 scr_overlay_off ();
1790# endif 1770# endif
1791 } 1771 }
1792#endif 1772#endif
1793#if USE_XIM 1773#if USE_XIM
1838 case PropertyNotify: 1818 case PropertyNotify:
1839 /* 1819 /*
1840 * if user used some Esetroot compatible prog to set the root bg, 1820 * if user used some Esetroot compatible prog to set the root bg,
1841 * use the property to determine the pixmap. We use it later on. 1821 * use the property to determine the pixmap. We use it later on.
1842 */ 1822 */
1843 if (ev.xproperty.atom != xa[XA_XROOTPMAP_ID] 1823 if (ev.xproperty.atom == xa[XA_XROOTPMAP_ID]
1844 && ev.xproperty.atom != xa[XA_ESETROOT_PMAP_ID]) 1824 || ev.xproperty.atom == xa[XA_ESETROOT_PMAP_ID])
1845 return; 1825 {
1846 1826 bgPixmap.set_root_pixmap ();
1847 /* FALLTHROUGH */ 1827 update_background ();
1848 case ReparentNotify: 1828 }
1849 if (option (Opt_transparent))
1850 check_our_parents ();
1851 break; 1829 break;
1852 } 1830 }
1853# endif 1831# endif
1854} 1832}
1855#endif 1833#endif
2574 process_dcs_seq (); 2552 process_dcs_seq ();
2575 break; 2553 break;
2576 case 0x9b: /* CSI */ 2554 case 0x9b: /* CSI */
2577 process_csi_seq (); 2555 process_csi_seq ();
2578 break; 2556 break;
2579 case 0x9d: /* CSI */ 2557 case 0x9d: /* OSC */
2580 process_osc_seq (); 2558 process_osc_seq ();
2581 break; 2559 break;
2582#endif 2560#endif
2583 } 2561 }
2584} 2562}
2810rxvt_term::process_csi_seq () 2788rxvt_term::process_csi_seq ()
2811{ 2789{
2812 unicode_t ch, priv, i; 2790 unicode_t ch, priv, i;
2813 unsigned int nargs, p; 2791 unsigned int nargs, p;
2814 int n, ndef; 2792 int n, ndef;
2815 int arg[ESC_ARGS]; 2793 int arg[ESC_ARGS] = { };
2816 2794
2817 for (nargs = ESC_ARGS; nargs > 0;) 2795 nargs = 0;
2818 arg[--nargs] = 0;
2819 2796
2820 priv = 0; 2797 priv = 0;
2821 ch = cmd_getc (); 2798 ch = cmd_getc ();
2822 if (ch >= '<' && ch <= '?') 2799 if (ch >= '<' && ch <= '?')
2823 { /* '<' '=' '>' '?' */ 2800 { /* '<' '=' '>' '?' */
2867 switch (priv) 2844 switch (priv)
2868 { 2845 {
2869 case '>': 2846 case '>':
2870 if (ch == CSI_DA) /* secondary device attributes */ 2847 if (ch == CSI_DA) /* secondary device attributes */
2871 { 2848 {
2872 // first parameter is normally 0 for vt100, 1 for some newer vtxxx, 'R' for rxvt, 2849 // first parameter is normally 0 for vt100, 1 for vt220, 'R' for rxvt,
2873 // 'U' for rxvt-unicode != 7.[34] (where it was broken). 2850 // 'U' for rxvt-unicode != 7.[34] (where it was broken).
2874 // 2851 //
2875 // second parameter is xterm patch level for xterm, MMmmpp (e.g. 20703) for rxvt 2852 // second parameter is xterm patch level for xterm, MMmmpp (e.g. 20703) for rxvt
2876 // and Mm (e.g. 72 for 7.2) for urxvt <= 7.2, and 94 for later versions, to signify 2853 // and Mm (e.g. 72 for 7.2) for urxvt <= 7.2, and 94 for later versions, to signify
2877 // that we do not support xterm mouse reporting (should be 95 when we do). 2854 // that we do not support xterm mouse reporting (should be 95 when we do).
3435 break; 3412 break;
3436 case URxvt_Color_IT: 3413 case URxvt_Color_IT:
3437 process_color_seq (op, Color_IT, str, resp); 3414 process_color_seq (op, Color_IT, str, resp);
3438 break; 3415 break;
3439#endif 3416#endif
3440#if ENABLE_TRANSPARENCY && TINTING 3417#if ENABLE_TRANSPARENCY
3441 case URxvt_Color_tint: 3418 case URxvt_Color_tint:
3442 process_color_seq (op, Color_tint, str, resp); 3419 process_color_seq (op, Color_tint, str, resp);
3420 {
3421 bool changed = false;
3422 if (ISSET_PIXCOLOR (Color_tint))
3423 changed = bgPixmap.set_tint (pix_colors_focused [Color_tint]);
3424 else
3425 changed = bgPixmap.unset_tint ();
3426 if (changed)
3427 update_background ();
3428 }
3443 3429
3444 check_our_parents ();
3445
3446 if (am_transparent)
3447 want_full_refresh = want_refresh = 1;
3448
3449 break; 3430 break;
3450#endif 3431#endif
3451 3432
3433#if BG_IMAGE_FROM_FILE
3452 case Rxvt_Pixmap: 3434 case Rxvt_Pixmap:
3453 { 3435 if (!strcmp (str, "?"))
3454 if (*str != ';')
3455 { 3436 {
3456#if XPM_BACKGROUND 3437 char str[256];
3457 scale_pixmap (""); /* reset to default scaling */ 3438
3458 set_bgPixmap (str); /* change pixmap */ 3439 sprintf (str, "[%dx%d+%d+%d]", /* can't presume snprintf () ! */
3459 scr_touch (true); 3440 min (bgPixmap.h_scale, 32767), min (bgPixmap.v_scale, 32767),
3460#endif 3441 min (bgPixmap.h_align, 32767), min (bgPixmap.v_align, 32767));
3442 process_xterm_seq (XTerm_title, str, CHAR_ST);
3461 } 3443 }
3462 3444 else
3445 {
3463 int changed = 0; 3446 int changed = 0;
3464 3447
3465 while ((str = strchr (str, ';')) != NULL) 3448 if (*str != ';')
3466 { 3449 {
3450 /* reset to default scaling :*/
3451 bgPixmap.unset_geometry ();
3452 if (bgPixmap.set_file (str)) /* change pixmap */
3453 changed++;
3454 str = strchr (str, ';');
3455 if (str == NULL)
3456 bgPixmap.set_defaultGeometry ();
3457 }
3458 while (str)
3459 {
3467 str++; 3460 str++;
3468#if XPM_BACKGROUND 3461 if (bgPixmap.set_geometry (str))
3469 changed += scale_pixmap (str); 3462 changed++;
3470#endif 3463 str = strchr (str, ';');
3471 } 3464 }
3472
3473 if (changed) 3465 if (changed)
3474 { 3466 update_background ();
3475#ifdef XPM_BACKGROUND
3476 resize_pixmap ();
3477 scr_touch (true);
3478#endif
3479 } 3467 }
3480#if ENABLE_TRANSPARENCY && defined(HAVE_AFTERIMAGE)
3481 if (option (Opt_transparent))
3482 check_our_parents ();
3483#endif
3484 }
3485 break; 3468 break;
3469#endif
3486 3470
3487 case Rxvt_restoreFG: 3471 case Rxvt_restoreFG:
3488 set_window_color (Color_fg, str); 3472 set_window_color (Color_fg, str);
3489 break; 3473 break;
3490 case Rxvt_restoreBG: 3474 case Rxvt_restoreBG:
3612{ 3596{
3613 unsigned int i, j; 3597 unsigned int i, j;
3614 int state; 3598 int state;
3615 3599
3616 static const struct 3600 static const struct
3617 { 3601 {
3618 const int argval; 3602 const int argval;
3619 const unsigned long bit; 3603 const unsigned long bit;
3620 }
3621
3622 argtopriv[] = { 3604 } argtopriv[] = {
3623 { 1, PrivMode_aplCUR }, 3605 { 1, PrivMode_aplCUR },
3624 { 2, PrivMode_vt52 }, 3606 { 2, PrivMode_vt52 },
3625 { 3, PrivMode_132 }, 3607 { 3, PrivMode_132 },
3626 { 4, PrivMode_smoothScroll }, 3608 { 4, PrivMode_smoothScroll },
3627 { 5, PrivMode_rVideo }, 3609 { 5, PrivMode_rVideo },
4019 4001
4020 if (v_buflen == 0) 4002 if (v_buflen == 0)
4021 { 4003 {
4022 free (v_buffer); 4004 free (v_buffer);
4023 v_buffer = 0; 4005 v_buffer = 0;
4024 v_buflen = 0;
4025 4006
4026 pty_ev.set (EVENT_READ); 4007 pty_ev.set (EVENT_READ);
4027 return; 4008 return;
4028 } 4009 }
4029 4010

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines