… | |
… | |
1388 | /* we need to re-generate transparency pixmap in that case ! */ |
1388 | /* we need to re-generate transparency pixmap in that case ! */ |
1389 | background_flags = make_transparency_pixmap (); |
1389 | background_flags = make_transparency_pixmap (); |
1390 | if (background_flags == 0) |
1390 | if (background_flags == 0) |
1391 | return false; |
1391 | return false; |
1392 | else if ((background_flags & transpTransformations) == (flags & transpTransformations)) |
1392 | else if ((background_flags & transpTransformations) == (flags & transpTransformations)) |
1393 | flags &= ~isInvalid; |
1393 | flags |= isValid; |
1394 | } |
1394 | } |
1395 | # endif |
1395 | # endif |
1396 | |
1396 | |
1397 | # ifdef BG_IMAGE_FROM_FILE |
1397 | # ifdef BG_IMAGE_FROM_FILE |
1398 | if (have_image |
1398 | if (have_image |
1399 | || (background_flags & transpTransformations) != (flags & transpTransformations)) |
1399 | || (background_flags & transpTransformations) != (flags & transpTransformations)) |
1400 | { |
1400 | { |
1401 | if (render_image (background_flags)) |
1401 | if (render_image (background_flags)) |
1402 | flags &= ~isInvalid; |
1402 | flags |= isValid; |
1403 | } |
1403 | } |
1404 | # endif |
1404 | # endif |
1405 | |
1405 | |
1406 | # if defined(ENABLE_TRANSPARENCY) && !defined(HAVE_AFTERIMAGE) |
1406 | # if defined(ENABLE_TRANSPARENCY) && !defined(HAVE_AFTERIMAGE) |
1407 | XImage *result = NULL; |
1407 | XImage *result = NULL; |
1408 | |
1408 | |
1409 | if (background_flags && (flags & isInvalid)) |
1409 | if (background_flags && !(flags & isValid)) |
1410 | { |
1410 | { |
1411 | result = XGetImage (target->dpy, pixmap, 0, 0, pmap_width, pmap_height, AllPlanes, ZPixmap); |
1411 | result = XGetImage (target->dpy, pixmap, 0, 0, pmap_width, pmap_height, AllPlanes, ZPixmap); |
1412 | } |
1412 | } |
1413 | |
1413 | |
1414 | if (result) |
1414 | if (result) |
… | |
… | |
1427 | if (gc) |
1427 | if (gc) |
1428 | { |
1428 | { |
1429 | XPutImage (target->dpy, pixmap, gc, result, 0, 0, 0, 0, result->width, result->height); |
1429 | XPutImage (target->dpy, pixmap, gc, result, 0, 0, 0, 0, result->width, result->height); |
1430 | |
1430 | |
1431 | XFreeGC (target->dpy, gc); |
1431 | XFreeGC (target->dpy, gc); |
1432 | flags &= ~isInvalid; |
1432 | flags |= isValid; |
1433 | } |
1433 | } |
1434 | |
1434 | |
1435 | XDestroyImage (result); |
1435 | XDestroyImage (result); |
1436 | } |
1436 | } |
1437 | # endif |
1437 | # endif |
1438 | |
1438 | |
1439 | if (flags & isInvalid) |
1439 | if (!(flags & isValid)) |
1440 | { |
1440 | { |
1441 | if (pixmap != None) |
1441 | if (pixmap != None) |
1442 | { |
1442 | { |
1443 | XFreePixmap (target->dpy, pixmap); |
1443 | XFreePixmap (target->dpy, pixmap); |
1444 | pixmap = None; |
1444 | pixmap = None; |