… | |
… | |
388 | #ifdef ENABLE_TRANSPARENCY |
388 | #ifdef ENABLE_TRANSPARENCY |
389 | if (!option(Opt_transparent) || !am_transparent) |
389 | if (!option(Opt_transparent) || !am_transparent) |
390 | /* will do that in check_our_parents otherwise */ |
390 | /* will do that in check_our_parents otherwise */ |
391 | #endif |
391 | #endif |
392 | { |
392 | { |
393 | ASImage *scaled_im = scale_asimage( display->asv, original_asim, w, h, ASA_XImage, 0, ASIMAGE_QUALITY_DEFAULT ); |
393 | ASImage *scaled_im = scale_asimage( asv, original_asim, w, h, ASA_XImage, 0, ASIMAGE_QUALITY_DEFAULT ); |
394 | if (scaled_im) |
394 | if (scaled_im) |
395 | { |
395 | { |
396 | pixmap = asimage2pixmap( display->asv, display->root, scaled_im, gc, True ); |
396 | pixmap = AFTERIMAGE_DPY_OP(asimage2pixmap( asv, display->root, scaled_im, gc, True )); |
397 | destroy_asimage( &scaled_im ); |
397 | destroy_asimage( &scaled_im ); |
398 | } |
398 | } |
399 | } |
399 | } |
400 | #else /* HAVE_AFTERIMAGE */ |
400 | #else /* HAVE_AFTERIMAGE */ |
401 | { |
401 | { |
… | |
… | |
491 | original_asim = get_asimage( asimman, f, 0xFFFFFFFF, 100 ); |
491 | original_asim = get_asimage( asimman, f, 0xFFFFFFFF, 100 ); |
492 | free( f ); |
492 | free( f ); |
493 | } |
493 | } |
494 | if (original_asim) |
494 | if (original_asim) |
495 | { |
495 | { |
496 | bgPixmap.pixmap = asimage2pixmap( display->asv, display->root, original_asim, NULL, True ); |
496 | bgPixmap.pixmap = AFTERIMAGE_DPY_OP(asimage2pixmap( asv, display->root, original_asim, NULL, True )); |
497 | xpmAttr.width = original_asim->width ; |
497 | xpmAttr.width = original_asim->width ; |
498 | xpmAttr.height = original_asim->height ; |
498 | xpmAttr.height = original_asim->height ; |
499 | } |
499 | } |
500 | #else /* HAVE_AFTERIMAGE */ |
500 | #else /* HAVE_AFTERIMAGE */ |
501 | xpmAttr.closeness = 30000; |
501 | xpmAttr.closeness = 30000; |
… | |
… | |
901 | }}while(0) |
901 | }}while(0) |
902 | |
902 | |
903 | MAKE_ROOTPMAP_GEOM(x,w,width); |
903 | MAKE_ROOTPMAP_GEOM(x,w,width); |
904 | MAKE_ROOTPMAP_GEOM(y,h,height); |
904 | MAKE_ROOTPMAP_GEOM(y,h,height); |
905 | |
905 | |
906 | layers[0].im = pixmap2asimage (display->asv, rootpixmap, back_x, back_y, back_w, back_h, AllPlanes, ASA_ASImage, 100); |
906 | layers[0].im = AFTERIMAGE_DPY_OP(pixmap2asimage (asv, rootpixmap, back_x, back_y, back_w, back_h, AllPlanes, ASA_ASImage, 100)); |
907 | layers[0].clip_x = (back_w == pmap_w)?root_x:0; |
907 | layers[0].clip_x = (back_w == pmap_w)?root_x:0; |
908 | layers[0].clip_y = (back_h == pmap_h)?root_y:0; |
908 | layers[0].clip_y = (back_h == pmap_h)?root_y:0; |
909 | layers[0].clip_width = szHint.width; |
909 | layers[0].clip_width = szHint.width; |
910 | layers[0].clip_height = szHint.height; |
910 | layers[0].clip_height = szHint.height; |
911 | layers[0].tint = tint; |
911 | layers[0].tint = tint; |
912 | if (rs[Rs_blurradius] && layers[0].im) |
912 | if (rs[Rs_blurradius] && layers[0].im) |
913 | { |
913 | { |
914 | double r = atof(rs[Rs_blurradius]); |
914 | double r = atof(rs[Rs_blurradius]); |
915 | ASImage* tmp = blur_asimage_gauss(display->asv, layers[0].im, r, r, 0xFFFFFFFF, ASA_ASImage, 100, ASIMAGE_QUALITY_DEFAULT ); |
915 | ASImage* tmp = blur_asimage_gauss(asv, layers[0].im, r, r, 0xFFFFFFFF, ASA_ASImage, 100, ASIMAGE_QUALITY_DEFAULT ); |
916 | if( tmp ) |
916 | if( tmp ) |
917 | { |
917 | { |
918 | destroy_asimage( &layers[0].im ); |
918 | destroy_asimage( &layers[0].im ); |
919 | layers[0].im = tmp; |
919 | layers[0].im = tmp; |
920 | } |
920 | } |
… | |
… | |
934 | fore_h = bgPixmap.h; |
934 | fore_h = bgPixmap.h; |
935 | } |
935 | } |
936 | if (fore_w != original_asim->width |
936 | if (fore_w != original_asim->width |
937 | || fore_h != original_asim->height) |
937 | || fore_h != original_asim->height) |
938 | { |
938 | { |
939 | layers[1].im = scale_asimage( display->asv, |
939 | layers[1].im = scale_asimage( asv, |
940 | original_asim, |
940 | original_asim, |
941 | fore_w, fore_h, |
941 | fore_w, fore_h, |
942 | ASA_ASImage, 100, |
942 | ASA_ASImage, 100, |
943 | ASIMAGE_QUALITY_DEFAULT ); |
943 | ASIMAGE_QUALITY_DEFAULT ); |
944 | } |
944 | } |
… | |
… | |
951 | layers[1].merge_scanlines = blend_scanlines_name2func(rs[Rs_blendtype]); |
951 | layers[1].merge_scanlines = blend_scanlines_name2func(rs[Rs_blendtype]); |
952 | if( layers[1].merge_scanlines == NULL ) |
952 | if( layers[1].merge_scanlines == NULL ) |
953 | layers[1].merge_scanlines = alphablend_scanlines; |
953 | layers[1].merge_scanlines = alphablend_scanlines; |
954 | } |
954 | } |
955 | } |
955 | } |
956 | merged_im = merge_layers( display->asv, layers, layers[1].im?2:1, |
956 | merged_im = merge_layers( asv, layers, layers[1].im?2:1, |
957 | szHint.width, szHint.height, |
957 | szHint.width, szHint.height, |
958 | ASA_XImage, 0, ASIMAGE_QUALITY_DEFAULT ); |
958 | ASA_XImage, 0, ASIMAGE_QUALITY_DEFAULT ); |
959 | if (layers[1].im != original_asim) |
959 | if (layers[1].im != original_asim) |
960 | destroy_asimage( &(layers[1].im) ); |
960 | destroy_asimage( &(layers[1].im) ); |
961 | destroy_asimage( &(layers[0].im) ); |
961 | destroy_asimage( &(layers[0].im) ); |
962 | if (merged_im != NULL) |
962 | if (merged_im != NULL) |
963 | { |
963 | { |
964 | tmp_pmap = asimage2pixmap( display->asv, DefaultRootWindow(dpy), merged_im, gc, True ); |
964 | tmp_pmap = AFTERIMAGE_DPY_OP(asimage2pixmap( asv, DefaultRootWindow(dpy), merged_im, gc, True )); |
965 | destroy_asimage( &merged_im ); |
965 | destroy_asimage( &merged_im ); |
966 | } |
966 | } |
967 | free( layers ); |
967 | free( layers ); |
968 | } |
968 | } |
969 | } |
969 | } |