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

Comparing rxvt-unicode/src/background.C (file contents):
Revision 1.145 by sf-exg, Fri Jan 28 00:21:10 2011 UTC vs.
Revision 1.152 by sf-exg, Sun May 8 21:03:03 2011 UTC

1/*----------------------------------------------------------------------* 1/*----------------------------------------------------------------------*
2 * File: background.C - former xpm.C 2 * File: background.C - former xpm.C
3 *----------------------------------------------------------------------* 3 *----------------------------------------------------------------------*
4 * 4 *
5 * All portions of code are copyright by their respective author/s. 5 * All portions of code are copyright by their respective author/s.
6 * Copyright (c) 2005-2008 Marc Lehmann <pcg@goof.com> 6 * Copyright (c) 2005-2008 Marc Lehmann <schmorp@schmorp.de>
7 * Copyright (c) 2007 Sasha Vasko <sasha@aftercode.net> 7 * Copyright (c) 2007 Sasha Vasko <sasha@aftercode.net>
8 * Copyright (c) 2010 Emanuele Giaquinta <e.giaquinta@glauco.it> 8 * Copyright (c) 2010 Emanuele Giaquinta <e.giaquinta@glauco.it>
9 * 9 *
10 * This program is free software; you can redistribute it and/or modify 10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by 11 * it under the terms of the GNU General Public License as published by
723 result = gdk_pixbuf_scale_simple (pixbuf, 723 result = gdk_pixbuf_scale_simple (pixbuf,
724 w, h, 724 w, h,
725 GDK_INTERP_BILINEAR); 725 GDK_INTERP_BILINEAR);
726 } 726 }
727 727
728 if (!result)
729 return false;
730
728 bool ret = false; 731 bool ret = false;
729 732
730 if (result)
731 {
732 XGCValues gcv; 733 XGCValues gcv;
733 GC gc; 734 GC gc;
734 Pixmap root_pmap; 735 Pixmap root_pmap;
735 736
736 image_width = gdk_pixbuf_get_width (result); 737 image_width = gdk_pixbuf_get_width (result);
737 image_height = gdk_pixbuf_get_height (result); 738 image_height = gdk_pixbuf_get_height (result);
738 739
739 if (tr_flags) 740 if (tr_flags)
740 { 741 {
741 root_pmap = bg_pixmap; 742 root_pmap = bg_pixmap;
742 bg_pixmap = None; 743 bg_pixmap = None;
743 } 744 }
744 else 745 else
745 { 746 {
746 if (h_scale == 0 || v_scale == 0) 747 if (h_scale == 0 || v_scale == 0)
747 { 748 {
748 new_pmap_width = min (image_width, target_width); 749 new_pmap_width = min (image_width, target_width);
749 new_pmap_height = min (image_height, target_height); 750 new_pmap_height = min (image_height, target_height);
750 } 751 }
751 } 752 }
752 753
753 if (bg_pixmap == None 754 if (bg_pixmap == None
754 || bg_pmap_width != new_pmap_width 755 || bg_pmap_width != new_pmap_width
755 || bg_pmap_height != new_pmap_height) 756 || bg_pmap_height != new_pmap_height)
756 { 757 {
757 if (bg_pixmap) 758 if (bg_pixmap)
758 XFreePixmap (dpy, bg_pixmap); 759 XFreePixmap (dpy, bg_pixmap);
759 bg_pixmap = XCreatePixmap (dpy, vt, new_pmap_width, new_pmap_height, depth); 760 bg_pixmap = XCreatePixmap (dpy, vt, new_pmap_width, new_pmap_height, depth);
760 bg_pmap_width = new_pmap_width; 761 bg_pmap_width = new_pmap_width;
761 bg_pmap_height = new_pmap_height; 762 bg_pmap_height = new_pmap_height;
762 } 763 }
763 764
765 if (bg_pixmap != None)
766 {
764 gcv.foreground = pix_colors[Color_bg]; 767 gcv.foreground = pix_colors[Color_bg];
765 gc = XCreateGC (dpy, vt, GCForeground, &gcv); 768 gc = XCreateGC (dpy, vt, GCForeground, &gcv);
766 769
770 if (gc)
771 {
767 if (h_scale == 0 || v_scale == 0) 772 if (h_scale == 0 || v_scale == 0)
768 { 773 {
769 Pixmap tile = XCreatePixmap (dpy, vt, image_width, image_height, depth); 774 Pixmap tile = XCreatePixmap (dpy, vt, image_width, image_height, depth);
775
776 if (tile != None)
777 {
770 pixbuf_to_pixmap (result, tile, gc, 778 pixbuf_to_pixmap (result, tile, gc,
771 0, 0, 779 0, 0,
772 0, 0, 780 0, 0,
773 image_width, image_height); 781 image_width, image_height);
774 782
775 gcv.tile = tile; 783 gcv.tile = tile;
776 gcv.fill_style = FillTiled; 784 gcv.fill_style = FillTiled;
777 gcv.ts_x_origin = x; 785 gcv.ts_x_origin = x;
778 gcv.ts_y_origin = y; 786 gcv.ts_y_origin = y;
779 XChangeGC (dpy, gc, GCFillStyle | GCTile | GCTileStipXOrigin | GCTileStipYOrigin, &gcv); 787 XChangeGC (dpy, gc, GCFillStyle | GCTile | GCTileStipXOrigin | GCTileStipYOrigin, &gcv);
780 788
781 XFillRectangle (dpy, bg_pixmap, gc, 0, 0, new_pmap_width, new_pmap_height); 789 XFillRectangle (dpy, bg_pixmap, gc, 0, 0, new_pmap_width, new_pmap_height);
782 XFreePixmap (dpy, tile); 790 XFreePixmap (dpy, tile);
791 }
783 } 792 }
784 else 793 else
785 { 794 {
786 int src_x, src_y, dst_x, dst_y; 795 int src_x, src_y, dst_x, dst_y;
787 int dst_width, dst_height; 796 int dst_width, dst_height;
788 797
789 src_x = make_clip_rectangle (x, image_width , new_pmap_width , dst_x, dst_width ); 798 src_x = make_clip_rectangle (x, image_width , new_pmap_width , dst_x, dst_width );
790 src_y = make_clip_rectangle (y, image_height, new_pmap_height, dst_y, dst_height); 799 src_y = make_clip_rectangle (y, image_height, new_pmap_height, dst_y, dst_height);
791 800
792 if (dst_x > 0 || dst_y > 0 801 if (dst_x > 0 || dst_y > 0
793 || dst_x + dst_width < new_pmap_width 802 || dst_x + dst_width < new_pmap_width
794 || dst_y + dst_height < new_pmap_height) 803 || dst_y + dst_height < new_pmap_height)
795 XFillRectangle (dpy, bg_pixmap, gc, 0, 0, new_pmap_width, new_pmap_height); 804 XFillRectangle (dpy, bg_pixmap, gc, 0, 0, new_pmap_width, new_pmap_height);
796 805
797 if (dst_x < new_pmap_width && dst_y < new_pmap_height) 806 if (dst_x < new_pmap_width && dst_y < new_pmap_height)
798 pixbuf_to_pixmap (result, bg_pixmap, gc, 807 pixbuf_to_pixmap (result, bg_pixmap, gc,
799 src_x, src_y, 808 src_x, src_y,
800 dst_x, dst_y, 809 dst_x, dst_y,
801 dst_width, dst_height); 810 dst_width, dst_height);
802 } 811 }
803 812
804#if XRENDER 813#if XRENDER
805 if (tr_flags) 814 if (tr_flags)
806 { 815 {
807 XRenderPictureAttributes pa; 816 XRenderPictureAttributes pa;
808 817
809 XRenderPictFormat *src_format = XRenderFindVisualFormat (dpy, visual); 818 XRenderPictFormat *src_format = XRenderFindVisualFormat (dpy, visual);
810 Picture src = XRenderCreatePicture (dpy, root_pmap, src_format, 0, &pa); 819 Picture src = XRenderCreatePicture (dpy, root_pmap, src_format, 0, &pa);
811 820
812 XRenderPictFormat *dst_format = XRenderFindVisualFormat (dpy, visual); 821 XRenderPictFormat *dst_format = XRenderFindVisualFormat (dpy, visual);
813 Picture dst = XRenderCreatePicture (dpy, bg_pixmap, dst_format, 0, &pa); 822 Picture dst = XRenderCreatePicture (dpy, bg_pixmap, dst_format, 0, &pa);
814 823
815 pa.repeat = True; 824 pa.repeat = True;
816 Pixmap mask_pmap = XCreatePixmap (dpy, vt, 1, 1, 8); 825 Pixmap mask_pmap = XCreatePixmap (dpy, vt, 1, 1, 8);
817 XRenderPictFormat *mask_format = XRenderFindStandardFormat (dpy, PictStandardA8); 826 XRenderPictFormat *mask_format = XRenderFindStandardFormat (dpy, PictStandardA8);
818 Picture mask = XRenderCreatePicture (dpy, mask_pmap, mask_format, CPRepeat, &pa); 827 Picture mask = XRenderCreatePicture (dpy, mask_pmap, mask_format, CPRepeat, &pa);
819 XFreePixmap (dpy, mask_pmap); 828 XFreePixmap (dpy, mask_pmap);
820 829
821 if (src && dst && mask) 830 if (src && dst && mask)
822 { 831 {
823 XRenderColor mask_c; 832 XRenderColor mask_c;
824 833
825 mask_c.alpha = 0x8000; 834 mask_c.alpha = 0x8000;
826 mask_c.red = 0; 835 mask_c.red = 0;
827 mask_c.green = 0; 836 mask_c.green = 0;
828 mask_c.blue = 0; 837 mask_c.blue = 0;
829 XRenderFillRectangle (dpy, PictOpSrc, mask, &mask_c, 0, 0, 1, 1); 838 XRenderFillRectangle (dpy, PictOpSrc, mask, &mask_c, 0, 0, 1, 1);
830 XRenderComposite (dpy, PictOpOver, src, mask, dst, 0, 0, 0, 0, 0, 0, target_width, target_height); 839 XRenderComposite (dpy, PictOpOver, src, mask, dst, 0, 0, 0, 0, 0, 0, target_width, target_height);
831 } 840 }
832 841
833 XRenderFreePicture (dpy, src); 842 XRenderFreePicture (dpy, src);
834 XRenderFreePicture (dpy, dst); 843 XRenderFreePicture (dpy, dst);
835 XRenderFreePicture (dpy, mask); 844 XRenderFreePicture (dpy, mask);
836
837 XFreePixmap (dpy, root_pmap);
838 } 845 }
839#endif 846#endif
840 847
848 XFreeGC (dpy, gc);
849
850 ret = true;
851 }
852 }
853
841 if (result != pixbuf) 854 if (result != pixbuf)
842 g_object_unref (result); 855 g_object_unref (result);
843 856
844 XFreeGC (dpy, gc); 857 if (tr_flags)
845 858 XFreePixmap (dpy, root_pmap);
846 ret = true;
847 }
848 859
849 return ret; 860 return ret;
850} 861}
851# endif /* HAVE_PIXBUF */ 862# endif /* HAVE_PIXBUF */
852 863
943 bg_flags |= BG_NEEDS_BLUR; 954 bg_flags |= BG_NEEDS_BLUR;
944 955
945 return changed; 956 return changed;
946} 957}
947 958
948static inline unsigned long 959void
949compute_tint_shade_flags (rxvt_color *tint, int shade) 960rxvt_term::set_tint_shade_flags ()
950{ 961{
951 unsigned long flags = 0;
952 rgba c (rgba::MAX_CC,rgba::MAX_CC,rgba::MAX_CC); 962 rgba c (rgba::MAX_CC,rgba::MAX_CC,rgba::MAX_CC);
953 bool has_shade = shade != 100; 963 bool has_shade = shade != 100;
954 964
955 if (tint) 965 bg_flags &= ~BG_TINT_FLAGS;
966
967 if (bg_flags & BG_TINT_SET)
956 { 968 {
957 tint->get (c); 969 tint.get (c);
958 if (!has_shade 970 if (!has_shade
959 && (c.r <= 0x00ff || c.r >= 0xff00) 971 && (c.r <= 0x00ff || c.r >= 0xff00)
960 && (c.g <= 0x00ff || c.g >= 0xff00) 972 && (c.g <= 0x00ff || c.g >= 0xff00)
961 && (c.b <= 0x00ff || c.b >= 0xff00)) 973 && (c.b <= 0x00ff || c.b >= 0xff00))
962 flags |= rxvt_term::BG_TINT_BITAND; 974 bg_flags |= BG_TINT_BITAND;
963 } 975 }
964 976
965 if (has_shade || tint) 977 if (has_shade || (bg_flags & BG_TINT_SET))
966 flags |= rxvt_term::BG_NEEDS_TINT; 978 bg_flags |= BG_NEEDS_TINT;
967
968 return flags;
969} 979}
970 980
971bool 981bool
972rxvt_term::bg_set_tint (rxvt_color &new_tint) 982rxvt_term::bg_set_tint (rxvt_color &new_tint)
973{ 983{
974 if (!(bg_flags & BG_TINT_SET) || tint != new_tint) 984 if (!(bg_flags & BG_TINT_SET) || tint != new_tint)
975 { 985 {
976 unsigned long new_flags = compute_tint_shade_flags (&new_tint, shade);
977 tint = new_tint; 986 tint = new_tint;
978 bg_flags = (bg_flags & ~BG_TINT_FLAGS) | new_flags | BG_TINT_SET; 987 bg_flags |= BG_TINT_SET;
988 set_tint_shade_flags ();
979 return true; 989 return true;
980 } 990 }
981 991
982 return false; 992 return false;
983} 993}
991 if (new_shade < 0) 1001 if (new_shade < 0)
992 new_shade = 200 - (100 + new_shade); 1002 new_shade = 200 - (100 + new_shade);
993 1003
994 if (new_shade != shade) 1004 if (new_shade != shade)
995 { 1005 {
996 unsigned long new_flags = compute_tint_shade_flags ((bg_flags & BG_TINT_SET) ? &tint : NULL, new_shade);
997 shade = new_shade; 1006 shade = new_shade;
998 bg_flags = (bg_flags & ~BG_TINT_FLAGS) | new_flags; 1007 set_tint_shade_flags ();
999 return true; 1008 return true;
1000 } 1009 }
1001 1010
1002 return false; 1011 return false;
1003} 1012}
1113 } 1122 }
1114 } 1123 }
1115 else 1124 else
1116 { 1125 {
1117# if XRENDER 1126# if XRENDER
1118 rgba c (rgba::MAX_CC,rgba::MAX_CC,rgba::MAX_CC); 1127 rgba c (rgba::MAX_CC, rgba::MAX_CC, rgba::MAX_CC);
1119 1128
1120 if (bg_flags & BG_TINT_SET) 1129 if (bg_flags & BG_TINT_SET)
1121 tint.get (c); 1130 tint.get (c);
1122 1131
1123 if (shade <= 100) 1132 if (shade <= 100)
1124 { 1133 {
1125 c.r = (c.r * shade) / 100; 1134 c.r = c.r * shade / 100;
1126 c.g = (c.g * shade) / 100; 1135 c.g = c.g * shade / 100;
1127 c.b = (c.b * shade) / 100; 1136 c.b = c.b * shade / 100;
1128 } 1137 }
1129 else 1138 else
1130 { 1139 {
1131 c.r = (c.r * (200 - shade)) / 100; 1140 c.r = c.r * (200 - shade) / 100;
1132 c.g = (c.g * (200 - shade)) / 100; 1141 c.g = c.g * (200 - shade) / 100;
1133 c.b = (c.b * (200 - shade)) / 100; 1142 c.b = c.b * (200 - shade) / 100;
1134 } 1143 }
1135 1144
1136 XRenderPictFormat *solid_format = XRenderFindStandardFormat (dpy, PictStandardARGB32); 1145 XRenderPictFormat *solid_format = XRenderFindStandardFormat (dpy, PictStandardARGB32);
1137 XRenderPictFormat *format = XRenderFindVisualFormat (dpy, visual); 1146 XRenderPictFormat *format = XRenderFindVisualFormat (dpy, visual);
1138 XRenderPictureAttributes pa; 1147 XRenderPictureAttributes pa;
1145 Picture overlay_pic = XRenderCreatePicture (dpy, overlay_pmap, solid_format, CPRepeat, &pa); 1154 Picture overlay_pic = XRenderCreatePicture (dpy, overlay_pmap, solid_format, CPRepeat, &pa);
1146 XFreePixmap (dpy, overlay_pmap); 1155 XFreePixmap (dpy, overlay_pmap);
1147 1156
1148 pa.component_alpha = True; 1157 pa.component_alpha = True;
1149 Pixmap mask_pmap = XCreatePixmap (dpy, pixmap, 1, 1, 32); 1158 Pixmap mask_pmap = XCreatePixmap (dpy, pixmap, 1, 1, 32);
1150 Picture mask_pic = XRenderCreatePicture (dpy, mask_pmap, solid_format, CPRepeat|CPComponentAlpha, &pa); 1159 Picture mask_pic = XRenderCreatePicture (dpy, mask_pmap, solid_format, CPRepeat | CPComponentAlpha, &pa);
1151 XFreePixmap (dpy, mask_pmap); 1160 XFreePixmap (dpy, mask_pmap);
1152 1161
1153 if (mask_pic && overlay_pic && back_pic) 1162 if (mask_pic && overlay_pic && back_pic)
1154 { 1163 {
1155 XRenderColor mask_c; 1164 XRenderColor mask_c;
1156 1165
1157 mask_c.red = mask_c.green = mask_c.blue = 0;
1158 mask_c.alpha = 0xffff; 1166 mask_c.alpha = 0xffff;
1167 mask_c.red =
1168 mask_c.green =
1169 mask_c.blue = 0;
1159 XRenderFillRectangle (dpy, PictOpSrc, overlay_pic, &mask_c, 0, 0, 1, 1); 1170 XRenderFillRectangle (dpy, PictOpSrc, overlay_pic, &mask_c, 0, 0, 1, 1);
1160 1171
1161 mask_c.alpha = 0; 1172 mask_c.alpha = 0;
1162 mask_c.red = 0xffff - c.r; 1173 mask_c.red = 0xffff - c.r;
1163 mask_c.green = 0xffff - c.g; 1174 mask_c.green = 0xffff - c.g;
1164 mask_c.blue = 0xffff - c.b; 1175 mask_c.blue = 0xffff - c.b;
1165 XRenderFillRectangle (dpy, PictOpSrc, mask_pic, &mask_c, 0, 0, 1, 1); 1176 XRenderFillRectangle (dpy, PictOpSrc, mask_pic, &mask_c, 0, 0, 1, 1);
1166 XRenderComposite (dpy, PictOpOver, overlay_pic, mask_pic, back_pic, 0, 0, 0, 0, 0, 0, width, height); 1177 XRenderComposite (dpy, PictOpOver, overlay_pic, mask_pic, back_pic, 0, 0, 0, 0, 0, 0, width, height);
1167 1178
1168 if (shade > 100) 1179 if (shade > 100)
1169 { 1180 {
1184 } 1195 }
1185 1196
1186 return ret; 1197 return ret;
1187} 1198}
1188 1199
1189/* make_transparency_pixmap() 1200/*
1190 * Builds a pixmap of the same size as the terminal window that contains 1201 * Builds a pixmap of the same size as the terminal window that contains
1191 * the tiled portion of the root pixmap that is supposed to be covered by 1202 * the tiled portion of the root pixmap that is supposed to be covered by
1192 * our window. 1203 * our window.
1193 */ 1204 */
1194unsigned long 1205unsigned long
1238 if (root_pixmap != None && root_depth != depth) 1249 if (root_pixmap != None && root_depth != depth)
1239 { 1250 {
1240#if XRENDER 1251#if XRENDER
1241 if (bg_flags & BG_HAS_RENDER) 1252 if (bg_flags & BG_HAS_RENDER)
1242 { 1253 {
1243 XRenderPictureAttributes pa;
1244
1245 XRenderPictFormat *src_format = XRenderFindVisualFormat (dpy, DefaultVisual (dpy, screen));
1246 Picture src = XRenderCreatePicture (dpy, root_pixmap, src_format, 0, &pa);
1247
1248 recoded_root_pmap = XCreatePixmap (dpy, vt, root_pmap_width, root_pmap_height, depth); 1254 recoded_root_pmap = XCreatePixmap (dpy, vt, root_pmap_width, root_pmap_height, depth);
1255
1256 if (recoded_root_pmap != None)
1257 {
1258 XRenderPictureAttributes pa;
1259
1260 XRenderPictFormat *src_format = XRenderFindVisualFormat (dpy, DefaultVisual (dpy, screen));
1261 Picture src = XRenderCreatePicture (dpy, root_pixmap, src_format, 0, &pa);
1262
1249 XRenderPictFormat *dst_format = XRenderFindVisualFormat (dpy, visual); 1263 XRenderPictFormat *dst_format = XRenderFindVisualFormat (dpy, visual);
1250 Picture dst = XRenderCreatePicture (dpy, recoded_root_pmap, dst_format, 0, &pa); 1264 Picture dst = XRenderCreatePicture (dpy, recoded_root_pmap, dst_format, 0, &pa);
1251 1265
1252 if (src && dst) 1266 if (src && dst)
1253 XRenderComposite (dpy, PictOpSrc, src, None, dst, 0, 0, 0, 0, 0, 0, root_pmap_width, root_pmap_height); 1267 XRenderComposite (dpy, PictOpSrc, src, None, dst, 0, 0, 0, 0, 0, 0, root_pmap_width, root_pmap_height);
1254 else 1268 else
1255 { 1269 {
1256 XFreePixmap (dpy, recoded_root_pmap); 1270 XFreePixmap (dpy, recoded_root_pmap);
1257 root_pixmap = None; 1271 recoded_root_pmap = None;
1258 } 1272 }
1259 1273
1260 XRenderFreePicture (dpy, src); 1274 XRenderFreePicture (dpy, src);
1261 XRenderFreePicture (dpy, dst); 1275 XRenderFreePicture (dpy, dst);
1276 }
1262 } 1277 }
1263 else 1278 else
1264#endif 1279#endif
1265 root_pixmap = None; 1280 recoded_root_pmap = None;
1266 } 1281 }
1267 1282
1268 if (root_pixmap == None) 1283 if (recoded_root_pmap == None)
1269 return 0; 1284 return 0;
1270 1285
1271 if (bg_pixmap == None 1286 if (bg_pixmap == None
1272 || bg_pmap_width != window_width 1287 || bg_pmap_width != window_width
1273 || bg_pmap_height != window_height) 1288 || bg_pmap_height != window_height)
1277 bg_pixmap = XCreatePixmap (dpy, vt, window_width, window_height, depth); 1292 bg_pixmap = XCreatePixmap (dpy, vt, window_width, window_height, depth);
1278 bg_pmap_width = window_width; 1293 bg_pmap_width = window_width;
1279 bg_pmap_height = window_height; 1294 bg_pmap_height = window_height;
1280 } 1295 }
1281 1296
1282 if (bg_pixmap == None) 1297 if (bg_pixmap != None)
1283 return 0; 1298 {
1284
1285 /* straightforward pixmap copy */ 1299 /* straightforward pixmap copy */
1286 while (sx < 0) sx += (int)root_width; 1300 while (sx < 0) sx += (int)root_width;
1287 while (sy < 0) sy += (int)root_height; 1301 while (sy < 0) sy += (int)root_height;
1288 1302
1289 gcv.tile = recoded_root_pmap; 1303 gcv.tile = recoded_root_pmap;
1290 gcv.fill_style = FillTiled; 1304 gcv.fill_style = FillTiled;
1291 gcv.ts_x_origin = -sx; 1305 gcv.ts_x_origin = -sx;
1292 gcv.ts_y_origin = -sy; 1306 gcv.ts_y_origin = -sy;
1293 gc = XCreateGC (dpy, vt, GCFillStyle | GCTile | GCTileStipXOrigin | GCTileStipYOrigin, &gcv); 1307 gc = XCreateGC (dpy, vt, GCFillStyle | GCTile | GCTileStipXOrigin | GCTileStipYOrigin, &gcv);
1294 1308
1295 if (gc) 1309 if (gc)
1296 { 1310 {
1297 XFillRectangle (dpy, bg_pixmap, gc, 0, 0, window_width, window_height); 1311 XFillRectangle (dpy, bg_pixmap, gc, 0, 0, window_width, window_height);
1298 result |= BG_IS_VALID | (bg_flags & BG_EFFECTS_FLAGS); 1312 result |= BG_IS_VALID | (bg_flags & BG_EFFECTS_FLAGS);
1299 XFreeGC (dpy, gc); 1313 XFreeGC (dpy, gc);
1300 1314
1301 if (!(bg_flags & BG_CLIENT_RENDER)) 1315 if (!(bg_flags & BG_CLIENT_RENDER))
1302 { 1316 {
1303 if ((bg_flags & BG_NEEDS_BLUR) 1317 if ((bg_flags & BG_NEEDS_BLUR)
1304 && (bg_flags & BG_HAS_RENDER_CONV)) 1318 && (bg_flags & BG_HAS_RENDER_CONV))
1305 { 1319 {
1306 if (blur_pixmap (bg_pixmap, visual, window_width, window_height)) 1320 if (blur_pixmap (bg_pixmap, visual, window_width, window_height))
1307 result &= ~BG_NEEDS_BLUR; 1321 result &= ~BG_NEEDS_BLUR;
1308 } 1322 }
1309 if ((bg_flags & BG_NEEDS_TINT) 1323 if ((bg_flags & BG_NEEDS_TINT)
1310 && (bg_flags & (BG_TINT_BITAND | BG_HAS_RENDER))) 1324 && (bg_flags & (BG_TINT_BITAND | BG_HAS_RENDER)))
1311 { 1325 {
1312 if (tint_pixmap (bg_pixmap, visual, window_width, window_height)) 1326 if (tint_pixmap (bg_pixmap, visual, window_width, window_height))
1313 result &= ~BG_NEEDS_TINT; 1327 result &= ~BG_NEEDS_TINT;
1314 } 1328 }
1315 } /* server side rendering completed */ 1329 } /* server side rendering completed */
1330 }
1316 } 1331 }
1317 1332
1318 if (recoded_root_pmap != root_pixmap) 1333 if (recoded_root_pmap != root_pixmap)
1319 XFreePixmap (dpy, recoded_root_pmap); 1334 XFreePixmap (dpy, recoded_root_pmap);
1320 1335

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines