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

Comparing rxvt-unicode/src/xpm.C (file contents):
Revision 1.60 by sasha, Mon Aug 6 22:42:05 2007 UTC vs.
Revision 1.61 by ayin, Tue Aug 7 15:23:11 2007 UTC

961 i = (xa[XA_ESETROOT_PMAP_ID] 961 i = (xa[XA_ESETROOT_PMAP_ID]
962 && XGetWindowProperty (dpy, display->root, xa[XA_ESETROOT_PMAP_ID], 962 && XGetWindowProperty (dpy, display->root, xa[XA_ESETROOT_PMAP_ID],
963 0L, 1L, False, XA_PIXMAP, &atype, &aformat, 963 0L, 1L, False, XA_PIXMAP, &atype, &aformat,
964 &nitems, &bytes_after, &prop) == Success); 964 &nitems, &bytes_after, &prop) == Success);
965 965
966 /* TODO: the below logic needs to be cleaned up */
967 if (!i || prop == NULL 966 if (!i || prop == NULL)
968 || (!ISSET_PIXCOLOR (Color_tint) && rs[Rs_shade] == NULL
969#ifdef HAVE_AFTERIMAGE
970 && bgPixmap.original_asim == NULL && rs[Rs_blurradius] == NULL
971#endif
972 )
973 )
974 rootpixmap = None; 967 rootpixmap = None;
975 else 968 else
976 { 969 {
977 int junk; 970 int junk;
978 unsigned int ujunk; 971 unsigned int ujunk;
1198 } /* rootpixmap != None */ 1191 } /* rootpixmap != None */
1199 1192
1200 if (am_pixmap_trans) 1193 if (am_pixmap_trans)
1201 XSetWindowBackgroundPixmap (dpy, vt, ParentRelative); 1194 XSetWindowBackgroundPixmap (dpy, vt, ParentRelative);
1202 else 1195 else
1203 { 1196 return;
1204 unsigned int n;
1205 /*
1206 * InheritPixmap transparency
1207 */
1208 for (i = 1; i < (int) (sizeof (parent) / sizeof (Window)); i++)
1209 {
1210 oldp = parent[i];
1211 XQueryTree (dpy, parent[i - 1], &root, &parent[i], &list, &n);
1212 XFree (list);
1213
1214 if (parent[i] == display->root)
1215 {
1216 if (oldp != None)
1217 pchanged = 1;
1218
1219 break;
1220 }
1221
1222 if (oldp != parent[i])
1223 pchanged = 1;
1224 }
1225
1226 n = 0;
1227
1228 if (pchanged)
1229 for (; n < (unsigned int)i; n++)
1230 {
1231 XGetWindowAttributes (dpy, parent[n], &wattr);
1232
1233 if (wattr.depth != rootdepth || wattr.c_class == InputOnly)
1234 {
1235 n = (int) (sizeof (parent) / sizeof (Window)) + 1;
1236 break;
1237 }
1238 }
1239
1240 if (n > (sizeof (parent) / sizeof (parent[0])))
1241 {
1242 XSetWindowBackground (dpy, parent[0], pix_colors_focused[Color_border]);
1243 XSetWindowBackground (dpy, vt, pix_colors_focused[Color_bg]);
1244 am_transparent = 0;
1245 /* XXX: also turn off Opt_transparent? */
1246 }
1247 else
1248 {
1249 for (n = 0; n < (unsigned int)i; n++)
1250 {
1251 XSetWindowBackgroundPixmap (dpy, parent[n], ParentRelative);
1252 XClearWindow (dpy, parent[n]);
1253 }
1254
1255 XSetWindowBackgroundPixmap (dpy, vt, ParentRelative);
1256 am_transparent = 1;
1257 }
1258
1259 for (; i < (int) (sizeof (parent) / sizeof (Window)); i++)
1260 parent[i] = None;
1261 }
1262 1197
1263 if (scrollBar.win) 1198 if (scrollBar.win)
1264 { 1199 {
1265 XSetWindowBackgroundPixmap (dpy, scrollBar.win, ParentRelative); 1200 XSetWindowBackgroundPixmap (dpy, scrollBar.win, ParentRelative);
1266 scrollBar.setIdle (); 1201 scrollBar.setIdle ();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines