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.64 by pcg, Wed Mar 3 04:07:52 2004 UTC vs.
Revision 1.67 by pcg, Thu Mar 11 00:53:19 2004 UTC

1934 if (have_pixmap) 1934 if (have_pixmap)
1935 { 1935 {
1936 /* 1936 /*
1937 * Copy display->root pixmap transparency 1937 * Copy display->root pixmap transparency
1938 */ 1938 */
1939 int sx, sy, nx, ny; 1939 int sx, sy, nx, ny;
1940 unsigned int nw, nh; 1940 unsigned int nw, nh;
1941 Window cr; 1941 Window cr;
1942 XImage *image; 1942 XImage *image;
1943 GC gc; 1943 GC gc;
1944 XGCValues gcvalue; 1944 XGCValues gcvalue;
1945 1945
1946 XTranslateCoordinates (display->display, TermWin.parent[0], display->root, 1946 XTranslateCoordinates (display->display, TermWin.parent[0], display->root,
1947 0, 0, &sx, &sy, &cr); 1947 0, 0, &sx, &sy, &cr);
1948 nw = (unsigned int)szHint.width; 1948 nw = (unsigned int)szHint.width;
1949 nh = (unsigned int)szHint.height; 1949 nh = (unsigned int)szHint.height;
1950 nx = ny = 0; 1950 nx = ny = 0;
1951
1951 if (sx < 0) 1952 if (sx < 0)
1952 { 1953 {
1953 nw += sx; 1954 nw += sx;
1954 nx = -sx; 1955 nx = -sx;
1955 sx = 0; 1956 sx = 0;
1956 } 1957 }
1958
1957 if (sy < 0) 1959 if (sy < 0)
1958 { 1960 {
1959 nh += sy; 1961 nh += sy;
1960 ny = -sy; 1962 ny = -sy;
1961 sy = 0; 1963 sy = 0;
1962 } 1964 }
1965
1963 MIN_IT (nw, (unsigned int) (wrootattr.width - sx)); 1966 MIN_IT (nw, (unsigned int) (wrootattr.width - sx));
1964 MIN_IT (nh, (unsigned int) (wrootattr.height - sy)); 1967 MIN_IT (nh, (unsigned int) (wrootattr.height - sy));
1965 allowedxerror = -1; 1968 allowedxerror = -1;
1966 image = XGetImage (display->display, rootpixmap, sx, sy, nw, nh, AllPlanes, 1969 image = XGetImage (display->display, rootpixmap, sx, sy, nw, nh, AllPlanes,
1967 ZPixmap); 1970 ZPixmap);
2000 if (!am_transparent || !am_pixmap_trans) 2003 if (!am_transparent || !am_pixmap_trans)
2001 pchanged = 1; 2004 pchanged = 1;
2002 am_transparent = am_pixmap_trans = 1; 2005 am_transparent = am_pixmap_trans = 1;
2003 } 2006 }
2004 } 2007 }
2008
2005 if (!am_pixmap_trans) 2009 if (!am_pixmap_trans)
2006 { 2010 {
2007 unsigned int n; 2011 unsigned int n;
2008 /* 2012 /*
2009 * InheritPixmap transparency 2013 * InheritPixmap transparency
2024 break; 2028 break;
2025 } 2029 }
2026 if (oldp != TermWin.parent[i]) 2030 if (oldp != TermWin.parent[i])
2027 pchanged = 1; 2031 pchanged = 1;
2028 } 2032 }
2033
2029 n = 0; 2034 n = 0;
2035
2030 if (pchanged) 2036 if (pchanged)
2031 { 2037 {
2032 for (; n < (unsigned int)i; n++) 2038 for (; n < (unsigned int)i; n++)
2033 { 2039 {
2034 XGetWindowAttributes (display->display, TermWin.parent[n], &wattr); 2040 XGetWindowAttributes (display->display, TermWin.parent[n], &wattr);
2038 n = (int) (sizeof (TermWin.parent) / sizeof (Window)) + 1; 2044 n = (int) (sizeof (TermWin.parent) / sizeof (Window)) + 1;
2039 break; 2045 break;
2040 } 2046 }
2041 } 2047 }
2042 } 2048 }
2049
2043 if (n > (int) (sizeof (TermWin.parent) 2050 if (n > (int) (sizeof (TermWin.parent)
2044 / sizeof (TermWin.parent[0]))) 2051 / sizeof (TermWin.parent[0])))
2045 { 2052 {
2046 D_X ((stderr, "InheritPixmap Turning off")); 2053 D_X ((stderr, "InheritPixmap Turning off"));
2047 XSetWindowBackground (display->display, TermWin.parent[0], 2054 XSetWindowBackground (display->display, TermWin.parent[0],
2070 ParentRelative); 2077 ParentRelative);
2071 XSetWindowBackgroundPixmap (display->display, TermWin.vt, 2078 XSetWindowBackgroundPixmap (display->display, TermWin.vt,
2072 ParentRelative); 2079 ParentRelative);
2073 am_transparent = 1; 2080 am_transparent = 1;
2074 } 2081 }
2082
2075 for (; i < (int) (sizeof (TermWin.parent) / sizeof (Window)); i++) 2083 for (; i < (int) (sizeof (TermWin.parent) / sizeof (Window)); i++)
2076 TermWin.parent[i] = None; 2084 TermWin.parent[i] = None;
2077 } 2085 }
2078 return pchanged; 2086 return pchanged;
2079} 2087}
2085/*----------------------------------------------------------------------*/ 2093/*----------------------------------------------------------------------*/
2086#ifdef PRINTPIPE 2094#ifdef PRINTPIPE
2087FILE * 2095FILE *
2088rxvt_term::popen_printer () 2096rxvt_term::popen_printer ()
2089{ 2097{
2090 FILE *stream = popen (rs[Rs_print_pipe], "w"); 2098 FILE *stream = popen (rs[Rs_print_pipe], "w");
2091 2099
2092 if (stream == NULL) 2100 if (stream == NULL)
2093 rxvt_print_error ("can't open printer pipe"); 2101 rxvt_print_error ("can't open printer pipe");
2094 return stream; 2102 return stream;
2095} 2103}
2936 * 19 = change underlined character color 2944 * 19 = change underlined character color
2937 * 46 = change logfile (not implemented) 2945 * 46 = change logfile (not implemented)
2938 * 50 = change font 2946 * 50 = change font
2939 * 2947 *
2940 * rxvt extensions: 2948 * rxvt extensions:
2941 * 9 = change locale (NYI)
2942 * 10 = menu (may change in future) 2949 * 10 = menu (may change in future)
2943 * 20 = bg pixmap 2950 * 20 = bg pixmap
2944 * 39 = change default fg color 2951 * 39 = change default fg color
2945 * 49 = change default bg color 2952 * 49 = change default bg color
2946 * 55 = dump scrollback buffer and all of screen 2953 * 55 = dump scrollback buffer and all of screen
2954 * 701 = change locale
2955 * 702 = find font
2947 */ 2956 */
2948void 2957void
2949rxvt_term::xterm_seq (int op, const char *str, unsigned char resp __attribute__ ((unused))) 2958rxvt_term::xterm_seq (int op, const char *str, unsigned char resp __attribute__ ((unused)))
2950{ 2959{
2951 int changed = 0; 2960 int changed = 0;
3049 { 3058 {
3050 set_locale (str); 3059 set_locale (str);
3051# ifdef USE_XIM 3060# ifdef USE_XIM
3052 im_cb (); 3061 im_cb ();
3053# endif 3062# endif
3054 // TODO: call selection_make with the right values set
3055 // to re-fresh the selection.
3056 if (display->selection_owner == this)
3057 display->set_selection_owner (0);
3058 } 3063 }
3064 break;
3065 case XTerm_findfont:
3066 {
3067 int fid = TermWin.fontset->find_font (atoi (str));
3068 tt_printf ("%d %-.250s\n", fid, (*TermWin.fontset)[fid]->name);
3069 }
3059 break; 3070 break;
3060#endif 3071#endif
3061#if 0 3072#if 0
3062 case XTerm_dumpscreen: /* no error notices */ 3073 case XTerm_dumpscreen: /* no error notices */
3063 { 3074 {
3193 */ 3204 */
3194 PrivMode (1, PrivMode_vt52); 3205 PrivMode (1, PrivMode_vt52);
3195 break; 3206 break;
3196 case 3: /* 80/132 */ 3207 case 3: /* 80/132 */
3197 if (PrivateModes & PrivMode_132OK) 3208 if (PrivateModes & PrivMode_132OK)
3198 set_widthheight ( (unsigned int) ((state ? 132 : 80) * TermWin.fwidth), 3209 set_widthheight (((state ? 132 : 80) * TermWin.fwidth), TermWin.height);
3199 (unsigned int)TermWin.height);
3200 break; 3210 break;
3201 case 4: /* smooth scrolling */ 3211 case 4: /* smooth scrolling */
3202 if (state) 3212 if (state)
3203 Options &= ~Opt_jumpScroll; 3213 Options &= ~Opt_jumpScroll;
3204 else 3214 else

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines