… | |
… | |
796 | while (pty_fill ()) |
796 | while (pty_fill ()) |
797 | if (cmd_parse ()) |
797 | if (cmd_parse ()) |
798 | break; |
798 | break; |
799 | } |
799 | } |
800 | |
800 | |
801 | #ifdef POINTER_BLANK |
|
|
802 | void |
801 | void |
803 | rxvt_term::pointer_unblank () |
802 | rxvt_term::pointer_unblank () |
804 | { |
803 | { |
805 | XDefineCursor (display->display, TermWin.vt, TermWin_cursor); |
804 | XDefineCursor (display->display, TermWin.vt, TermWin_cursor); |
806 | recolour_cursor (); |
805 | recolour_cursor (); |
807 | |
806 | |
|
|
807 | #ifdef POINTER_BLANK |
808 | hidden_pointer = 0; |
808 | hidden_pointer = 0; |
809 | |
809 | |
810 | if (Options & Opt_pointerBlank) |
810 | if (Options & Opt_pointerBlank) |
811 | pointer_ev.start (NOW + pointerBlankDelay); |
811 | pointer_ev.start (NOW + pointerBlankDelay); |
|
|
812 | #endif |
812 | } |
813 | } |
813 | |
814 | |
|
|
815 | #ifdef POINTER_BLANK |
814 | void |
816 | void |
815 | rxvt_term::pointer_blank () |
817 | rxvt_term::pointer_blank () |
816 | { |
818 | { |
817 | if (! (Options & Opt_pointerBlank)) |
819 | if (! (Options & Opt_pointerBlank)) |
818 | return; |
820 | return; |
… | |
… | |
1113 | #endif |
1115 | #endif |
1114 | #ifdef CURSOR_BLINK |
1116 | #ifdef CURSOR_BLINK |
1115 | if (Options & Opt_cursorBlink) |
1117 | if (Options & Opt_cursorBlink) |
1116 | cursor_blink_ev.start (NOW + BLINK_INTERVAL); |
1118 | cursor_blink_ev.start (NOW + BLINK_INTERVAL); |
1117 | #endif |
1119 | #endif |
|
|
1120 | #ifdef OFF_FOCUS_FADING |
|
|
1121 | if (rs[Rs_fade]) |
|
|
1122 | { |
|
|
1123 | PixColors = PixColorsFocused; |
|
|
1124 | set_colorfgbg (); |
|
|
1125 | scr_clear (); |
|
|
1126 | scr_touch (true); |
|
|
1127 | } |
|
|
1128 | #endif |
1118 | |
1129 | |
1119 | } |
1130 | } |
1120 | break; |
1131 | break; |
1121 | |
1132 | |
1122 | case FocusOut: |
1133 | case FocusOut: |
… | |
… | |
1130 | #endif |
1141 | #endif |
1131 | #ifdef CURSOR_BLINK |
1142 | #ifdef CURSOR_BLINK |
1132 | if (Options & Opt_cursorBlink) |
1143 | if (Options & Opt_cursorBlink) |
1133 | cursor_blink_ev.stop (); |
1144 | cursor_blink_ev.stop (); |
1134 | hidden_cursor = 0; |
1145 | hidden_cursor = 0; |
|
|
1146 | #endif |
|
|
1147 | #ifdef OFF_FOCUS_FADING |
|
|
1148 | if (rs[Rs_fade]) |
|
|
1149 | { |
|
|
1150 | PixColors = PixColorsUnFocused; |
|
|
1151 | set_colorfgbg (); |
|
|
1152 | scr_clear (); |
|
|
1153 | scr_touch (true); |
|
|
1154 | } |
1135 | #endif |
1155 | #endif |
1136 | |
1156 | |
1137 | } |
1157 | } |
1138 | break; |
1158 | break; |
1139 | |
1159 | |
… | |
… | |
1708 | |
1728 | |
1709 | # ifdef MOUSE_SLIP_WHEELING |
1729 | # ifdef MOUSE_SLIP_WHEELING |
1710 | if (ev.state & ControlMask) |
1730 | if (ev.state & ControlMask) |
1711 | { |
1731 | { |
1712 | mouse_slip_wheel_speed += v ? -1 : 1; |
1732 | mouse_slip_wheel_speed += v ? -1 : 1; |
|
|
1733 | if (mouse_slip_wheel_speed < -TermWin.nrow) mouse_slip_wheel_speed = -TermWin.nrow; |
|
|
1734 | if (mouse_slip_wheel_speed > +TermWin.nrow) mouse_slip_wheel_speed = +TermWin.nrow; |
|
|
1735 | |
|
|
1736 | if (slip_wheel_ev.at < NOW) |
1713 | slip_wheel_ev.start (NOW + SCROLLBAR_CONTINUOUS_DELAY); |
1737 | slip_wheel_ev.at = NOW + SCROLLBAR_CONTINUOUS_DELAY; |
|
|
1738 | |
|
|
1739 | slip_wheel_ev.start (); |
1714 | } |
1740 | } |
|
|
1741 | else |
|
|
1742 | { |
1715 | # endif |
1743 | # endif |
1716 | # ifdef JUMP_MOUSE_WHEEL |
1744 | # ifdef JUMP_MOUSE_WHEEL |
1717 | scr_page (v, i); |
|
|
1718 | scr_refresh (SMOOTH_REFRESH); |
|
|
1719 | scrollbar_show (1); |
|
|
1720 | # else |
|
|
1721 | while (i--) |
|
|
1722 | { |
|
|
1723 | scr_page (v, 1); |
1745 | scr_page (v, i); |
1724 | scr_refresh (SMOOTH_REFRESH); |
1746 | scr_refresh (SMOOTH_REFRESH); |
1725 | scrollbar_show (1); |
1747 | scrollbar_show (1); |
|
|
1748 | # else |
|
|
1749 | while (i--) |
|
|
1750 | { |
|
|
1751 | scr_page (v, 1); |
|
|
1752 | scr_refresh (SMOOTH_REFRESH); |
|
|
1753 | scrollbar_show (1); |
|
|
1754 | } |
|
|
1755 | # endif |
|
|
1756 | # ifdef MOUSE_SLIP_WHEELING |
1726 | } |
1757 | } |
1727 | # endif |
1758 | #endif |
1728 | |
|
|
1729 | } |
1759 | } |
1730 | break; |
1760 | break; |
1731 | #endif |
1761 | #endif |
1732 | |
|
|
1733 | } |
1762 | } |
1734 | } |
1763 | } |
1735 | #ifdef MENUBAR |
1764 | #ifdef MENUBAR |
1736 | else if (isMenuBarWindow (ev.window)) |
1765 | else if (isMenuBarWindow (ev.window)) |
1737 | menubar_control (ev); |
1766 | menubar_control (ev); |
… | |
… | |
2002 | if (rootdepth != wattr.depth) |
2031 | if (rootdepth != wattr.depth) |
2003 | { |
2032 | { |
2004 | if (am_transparent) |
2033 | if (am_transparent) |
2005 | { |
2034 | { |
2006 | pchanged = 1; |
2035 | pchanged = 1; |
2007 | XSetWindowBackground (display->display, TermWin.vt, PixColors[Color_bg]); |
2036 | XSetWindowBackground (display->display, TermWin.vt, PixColorsFocused[Color_bg]); |
2008 | am_transparent = am_pixmap_trans = 0; |
2037 | am_transparent = am_pixmap_trans = 0; |
2009 | } |
2038 | } |
2010 | |
2039 | |
2011 | return pchanged; /* Don't try any more */ |
2040 | return pchanged; /* Don't try any more */ |
2012 | } |
2041 | } |
… | |
… | |
2028 | i = (xa[XA_XSETROOTID] |
2057 | i = (xa[XA_XSETROOTID] |
2029 | && XGetWindowProperty (display->display, display->root, xa[XA_XSETROOTID], |
2058 | && XGetWindowProperty (display->display, display->root, xa[XA_XSETROOTID], |
2030 | 0L, 1L, False, XA_PIXMAP, &atype, &aformat, |
2059 | 0L, 1L, False, XA_PIXMAP, &atype, &aformat, |
2031 | &nitems, &bytes_after, &prop) == Success); |
2060 | &nitems, &bytes_after, &prop) == Success); |
2032 | |
2061 | |
2033 | if (!i || prop == NULL) |
2062 | if (!i || prop == NULL || !rs[Rs_color + Color_tint]) |
2034 | have_pixmap = 0; |
2063 | have_pixmap = 0; |
2035 | else |
2064 | else |
2036 | { |
2065 | { |
2037 | have_pixmap = 1; |
2066 | have_pixmap = 1; |
2038 | rootpixmap = *(Pixmap *)prop; |
2067 | rootpixmap = *(Pixmap *)prop; |
… | |
… | |
2049 | Window cr; |
2078 | Window cr; |
2050 | XImage *image; |
2079 | XImage *image; |
2051 | GC gc; |
2080 | GC gc; |
2052 | XGCValues gcvalue; |
2081 | XGCValues gcvalue; |
2053 | |
2082 | |
2054 | XTranslateCoordinates (display->display, TermWin.parent[0], display->root, |
2083 | XTranslateCoordinates (display->display, TermWin.vt, display->root, |
2055 | 0, 0, &sx, &sy, &cr); |
2084 | 0, 0, &sx, &sy, &cr); |
2056 | nw = (unsigned int)szHint.width; |
2085 | nw = (unsigned int)szHint.width; |
2057 | nh = (unsigned int)szHint.height; |
2086 | nh = (unsigned int)szHint.height; |
2058 | nx = ny = 0; |
2087 | nx = ny = 0; |
2059 | |
2088 | |
… | |
… | |
2100 | XFreePixmap (display->display, TermWin.pixmap); |
2129 | XFreePixmap (display->display, TermWin.pixmap); |
2101 | |
2130 | |
2102 | #if TINTING |
2131 | #if TINTING |
2103 | if (ISSET_PIXCOLOR (Color_tint)) |
2132 | if (ISSET_PIXCOLOR (Color_tint)) |
2104 | { |
2133 | { |
2105 | unsigned short shade, rm, gm, bm; |
2134 | unsigned short rm, gm, bm; |
2106 | |
2135 | if (rs[Rs_shade]) |
|
|
2136 | PixColorsFocused[Color_tint].fade (display, atoi (rs[Rs_shade])).get (display, rm, gm, bm); |
|
|
2137 | else |
2107 | PixColors[Color_tint].get (display, rm, gm, bm); |
2138 | PixColorsFocused[Color_tint].get (display, rm, gm, bm); |
2108 | |
2139 | |
2109 | rm >>= 8; gm >>= 8; bm >>= 8; // not 100% correct, but... |
2140 | rm >>= 8; gm >>= 8; bm >>= 8; // not 100% correct, but... |
2110 | |
2141 | |
2111 | /* Determine bitshift and bitmask values */ |
2142 | /* Determine bitshift and bitmask values */ |
2112 | switch (image->bits_per_pixel) |
2143 | switch (image->bits_per_pixel) |
… | |
… | |
2124 | gc = XCreateGC (display->display, TermWin.vt, 0UL, &gcvalue); |
2155 | gc = XCreateGC (display->display, TermWin.vt, 0UL, &gcvalue); |
2125 | XPutImage (display->display, TermWin.pixmap, gc, image, 0, 0, |
2156 | XPutImage (display->display, TermWin.pixmap, gc, image, 0, 0, |
2126 | nx, ny, image->width, image->height); |
2157 | nx, ny, image->width, image->height); |
2127 | XFreeGC (display->display, gc); |
2158 | XFreeGC (display->display, gc); |
2128 | XDestroyImage (image); |
2159 | XDestroyImage (image); |
2129 | XSetWindowBackgroundPixmap (display->display, TermWin.vt, |
2160 | XSetWindowBackgroundPixmap (display->display, TermWin.vt, TermWin.pixmap); |
2130 | TermWin.pixmap); |
|
|
2131 | |
2161 | |
2132 | if (!am_transparent || !am_pixmap_trans) |
2162 | if (!am_transparent || !am_pixmap_trans) |
2133 | pchanged = 1; |
2163 | pchanged = 1; |
2134 | |
2164 | |
2135 | am_transparent = am_pixmap_trans = 1; |
2165 | am_transparent = am_pixmap_trans = 1; |
… | |
… | |
2179 | } |
2209 | } |
2180 | } |
2210 | } |
2181 | |
2211 | |
2182 | if (n > (int) (sizeof (TermWin.parent) / sizeof (TermWin.parent[0]))) |
2212 | if (n > (int) (sizeof (TermWin.parent) / sizeof (TermWin.parent[0]))) |
2183 | { |
2213 | { |
2184 | D_X ((stderr, "InheritPixmap Turning off")); |
2214 | D_X ((stderr, "InheritPixmap Turning off")); /* Mikachu? */ |
2185 | XSetWindowBackground (display->display, TermWin.parent[0], PixColors[Color_fg]); |
2215 | XSetWindowBackground (display->display, TermWin.parent[0], PixColorsFocused[Color_fg]); |
2186 | XSetWindowBackground (display->display, TermWin.vt, PixColors[Color_bg]); |
2216 | XSetWindowBackground (display->display, TermWin.vt, PixColorsFocused[Color_bg]); |
2187 | am_transparent = 0; |
2217 | am_transparent = 0; |
2188 | /* XXX: also turn off Opt_transparent? */ |
2218 | /* XXX: also turn off Opt_transparent? */ |
2189 | } |
2219 | } |
2190 | else |
2220 | else |
2191 | { |
2221 | { |
… | |
… | |
3252 | if (str[0] == '?' && !str[1]) |
3282 | if (str[0] == '?' && !str[1]) |
3253 | { |
3283 | { |
3254 | if (Options & Opt_insecure) |
3284 | if (Options & Opt_insecure) |
3255 | { |
3285 | { |
3256 | unsigned short r, g, b; |
3286 | unsigned short r, g, b; |
3257 | PixColors[color].get (display, r, g, b); |
3287 | PixColorsFocused[color].get (display, r, g, b); |
3258 | tt_printf ("\033]%d;rgb:%04x/%04x/%04x%c", report, r, g, b, resp); |
3288 | tt_printf ("\033]%d;rgb:%04x/%04x/%04x%c", report, r, g, b, resp); |
3259 | } |
3289 | } |
3260 | } |
3290 | } |
3261 | else |
3291 | else |
3262 | set_window_color (color, str); |
3292 | set_window_color (color, str); |
… | |
… | |
3367 | if (name[0] == '?' && !name[1]) |
3397 | if (name[0] == '?' && !name[1]) |
3368 | { |
3398 | { |
3369 | if (Options & Opt_insecure) |
3399 | if (Options & Opt_insecure) |
3370 | { |
3400 | { |
3371 | unsigned short r, g, b; |
3401 | unsigned short r, g, b; |
3372 | PixColors[color + minCOLOR].get (display, r, g, b); |
3402 | PixColorsFocused[color + minCOLOR].get (display, r, g, b); |
3373 | tt_printf ("\033]%d;%d;rgb:%04x/%04x/%04x%c", XTerm_Color, color, r, g, b, resp); |
3403 | tt_printf ("\033]%d;%d;rgb:%04x/%04x/%04x%c", XTerm_Color, color, r, g, b, resp); |
3374 | } |
3404 | } |
3375 | } |
3405 | } |
3376 | else |
3406 | else |
3377 | set_window_color (color + minCOLOR, name); |
3407 | set_window_color (color + minCOLOR, name); |
… | |
… | |
3750 | rendset = 0, rendstyle = ~RS_None; |
3780 | rendset = 0, rendstyle = ~RS_None; |
3751 | break; |
3781 | break; |
3752 | case 1: |
3782 | case 1: |
3753 | rendset = 1, rendstyle = RS_Bold; |
3783 | rendset = 1, rendstyle = RS_Bold; |
3754 | break; |
3784 | break; |
|
|
3785 | //case 2: // faint or second colour |
3755 | case 4: |
3786 | case 4: |
3756 | rendset = 1, rendstyle = RS_Uline; |
3787 | rendset = 1, rendstyle = RS_Uline; |
3757 | break; |
3788 | break; |
3758 | case 5: |
3789 | case 5: // slowly blinking |
|
|
3790 | case 6: // rapidly blinking |
3759 | rendset = 1, rendstyle = RS_Blink; |
3791 | rendset = 1, rendstyle = RS_Blink; |
3760 | break; |
3792 | break; |
3761 | //case 6: // scoansi light background |
3793 | //case 6: // scoansi light background |
3762 | case 7: |
3794 | case 7: |
3763 | rendset = 1, rendstyle = RS_RVid; |
3795 | rendset = 1, rendstyle = RS_RVid; |
3764 | break; |
3796 | break; |
3765 | case 8: |
3797 | case 8: |
3766 | // invisible. NYI |
3798 | // invisible. NYI |
3767 | break; |
3799 | break; |
|
|
3800 | //case 9: // crossed out |
3768 | //case 10: // scoansi acs off |
3801 | //case 10: // scoansi acs off, primary font |
3769 | //case 11: // scoansi acs on |
3802 | //case 11: // scoansi acs on, first alt font |
3770 | //case 12: // scoansi acs on, |0x80 |
3803 | //case 12: // scoansi acs on, |0x80, second alt font |
3771 | case 21: // disable bold, blink and invis (some terminals use this) |
3804 | //... |
|
|
3805 | //case 19: // ninth alt font |
|
|
3806 | //case 20: // gothic |
|
|
3807 | case 21: // disable bold, faint |
3772 | rendset = 0, rendstyle = RS_Bold | RS_Blink; |
3808 | rendset = 0, rendstyle = RS_Bold; |
3773 | break; |
3809 | break; |
3774 | case 22: |
3810 | case 22: |
3775 | rendset = 0, rendstyle = RS_Bold; |
3811 | rendset = 0, rendstyle = RS_Bold; |
3776 | break; |
3812 | break; |
|
|
3813 | //case 23: disable italic |
3777 | case 24: |
3814 | case 24: |
3778 | rendset = 0, rendstyle = RS_Uline; |
3815 | rendset = 0, rendstyle = RS_Uline; |
3779 | break; |
3816 | break; |
3780 | case 25: |
3817 | case 25: |
3781 | rendset = 0, rendstyle = RS_Blink; |
3818 | rendset = 0, rendstyle = RS_Blink; |
3782 | break; |
3819 | break; |
3783 | case 27: |
3820 | case 27: |
3784 | rendset = 0, rendstyle = RS_RVid; |
3821 | rendset = 0, rendstyle = RS_RVid; |
3785 | break; |
3822 | break; |
3786 | case 28: |
|
|
3787 | // visible. NYI |
3823 | //case 28: // visible. NYI |
3788 | break; |
3824 | //case 29: // not crossed-out |
3789 | } |
3825 | } |
3790 | |
3826 | |
3791 | if (rendset != -1) |
3827 | if (rendset != -1) |
3792 | { |
3828 | { |
3793 | scr_rendition (rendset, rendstyle); |
3829 | scr_rendition (rendset, rendstyle); |