… | |
… | |
1299 | |
1299 | |
1300 | if (gc) |
1300 | if (gc) |
1301 | { |
1301 | { |
1302 | XFillRectangle (dpy, bg_pixmap, gc, 0, 0, window_width, window_height); |
1302 | XFillRectangle (dpy, bg_pixmap, gc, 0, 0, window_width, window_height); |
1303 | result |= BG_IS_VALID | (bg_flags & BG_EFFECTS_FLAGS); |
1303 | result |= BG_IS_VALID | (bg_flags & BG_EFFECTS_FLAGS); |
1304 | XFreeGC (dpy, gc); |
|
|
1305 | |
1304 | |
1306 | if (!(bg_flags & BG_CLIENT_RENDER)) |
1305 | if (!(bg_flags & BG_CLIENT_RENDER)) |
1307 | { |
1306 | { |
1308 | if (bg_flags & BG_NEEDS_BLUR) |
1307 | if (bg_flags & BG_NEEDS_BLUR) |
1309 | { |
1308 | { |
… | |
… | |
1313 | if (bg_flags & BG_NEEDS_TINT) |
1312 | if (bg_flags & BG_NEEDS_TINT) |
1314 | { |
1313 | { |
1315 | if (tint_pixmap (bg_pixmap, visual, window_width, window_height)) |
1314 | if (tint_pixmap (bg_pixmap, visual, window_width, window_height)) |
1316 | result &= ~BG_NEEDS_TINT; |
1315 | result &= ~BG_NEEDS_TINT; |
1317 | } |
1316 | } |
|
|
1317 | # ifndef HAVE_AFTERIMAGE |
|
|
1318 | if (result & BG_NEEDS_TINT) |
|
|
1319 | { |
|
|
1320 | XImage *ximage = XGetImage (dpy, bg_pixmap, 0, 0, bg_pmap_width, bg_pmap_height, AllPlanes, ZPixmap); |
|
|
1321 | if (ximage) |
|
|
1322 | { |
|
|
1323 | /* our own client-side tinting */ |
|
|
1324 | tint_ximage (DefaultVisual (dpy, display->screen), ximage); |
|
|
1325 | |
|
|
1326 | XPutImage (dpy, bg_pixmap, gc, ximage, 0, 0, 0, 0, ximage->width, ximage->height); |
|
|
1327 | XDestroyImage (ximage); |
|
|
1328 | } |
|
|
1329 | } |
|
|
1330 | # endif |
1318 | } /* server side rendering completed */ |
1331 | } /* server side rendering completed */ |
|
|
1332 | |
|
|
1333 | XFreeGC (dpy, gc); |
1319 | } |
1334 | } |
1320 | |
1335 | |
1321 | if (recoded_root_pmap != root_pixmap) |
1336 | if (recoded_root_pmap != root_pixmap) |
1322 | XFreePixmap (dpy, recoded_root_pmap); |
1337 | XFreePixmap (dpy, recoded_root_pmap); |
1323 | |
1338 | |
… | |
… | |
1356 | if ((bg_flags & BG_IS_FROM_FILE) |
1371 | if ((bg_flags & BG_IS_FROM_FILE) |
1357 | || (tr_flags & BG_EFFECTS_FLAGS)) |
1372 | || (tr_flags & BG_EFFECTS_FLAGS)) |
1358 | { |
1373 | { |
1359 | if (render_image (tr_flags)) |
1374 | if (render_image (tr_flags)) |
1360 | bg_flags |= BG_IS_VALID; |
1375 | bg_flags |= BG_IS_VALID; |
1361 | } |
|
|
1362 | # endif |
|
|
1363 | |
|
|
1364 | # if defined(ENABLE_TRANSPARENCY) && !defined(HAVE_AFTERIMAGE) |
|
|
1365 | XImage *result = NULL; |
|
|
1366 | |
|
|
1367 | if (tr_flags & BG_NEEDS_TINT) |
|
|
1368 | { |
|
|
1369 | result = XGetImage (dpy, bg_pixmap, 0, 0, bg_pmap_width, bg_pmap_height, AllPlanes, ZPixmap); |
|
|
1370 | } |
|
|
1371 | |
|
|
1372 | if (result) |
|
|
1373 | { |
|
|
1374 | /* our own client-side tinting */ |
|
|
1375 | //if (tr_flags & BG_NEEDS_TINT) |
|
|
1376 | if (1) |
|
|
1377 | tint_ximage (DefaultVisual (dpy, display->screen), result); |
|
|
1378 | |
|
|
1379 | GC gc = XCreateGC (dpy, vt, 0UL, NULL); |
|
|
1380 | |
|
|
1381 | if (gc) |
|
|
1382 | { |
|
|
1383 | XPutImage (dpy, bg_pixmap, gc, result, 0, 0, 0, 0, result->width, result->height); |
|
|
1384 | |
|
|
1385 | XFreeGC (dpy, gc); |
|
|
1386 | } |
|
|
1387 | |
|
|
1388 | XDestroyImage (result); |
|
|
1389 | } |
1376 | } |
1390 | # endif |
1377 | # endif |
1391 | |
1378 | |
1392 | if (!(bg_flags & BG_IS_VALID)) |
1379 | if (!(bg_flags & BG_IS_VALID)) |
1393 | { |
1380 | { |