… | |
… | |
441 | { |
441 | { |
442 | flags = new_flags; |
442 | flags = new_flags; |
443 | changed++; |
443 | changed++; |
444 | } |
444 | } |
445 | |
445 | |
446 | //fprintf (stderr, "flags = %lX, scale = %ux%u, align=%+d%+d\n", |
446 | //fprintf (stderr, "flags = %lX, scale = %ux%u, align=%+d%+d\n", |
447 | // flags, h_scale, v_scale, h_align, v_align); |
447 | // flags, h_scale, v_scale, h_align, v_align); |
448 | return (changed > 0); |
448 | return (changed > 0); |
449 | } |
449 | } |
450 | |
450 | |
451 | # ifdef HAVE_AFTERIMAGE |
451 | # ifdef HAVE_AFTERIMAGE |
452 | bool |
452 | bool |
… | |
… | |
804 | flags |= bgPixmap_t::tintNeeded; |
804 | flags |= bgPixmap_t::tintNeeded; |
805 | else if (tint) |
805 | else if (tint) |
806 | { |
806 | { |
807 | if ((c.r > 0x000700 || c.g > 0x000700 || c.b > 0x000700) |
807 | if ((c.r > 0x000700 || c.g > 0x000700 || c.b > 0x000700) |
808 | && (c.r < 0x00f700 || c.g < 0x00f700 || c.b < 0x00f700)) |
808 | && (c.r < 0x00f700 || c.g < 0x00f700 || c.b < 0x00f700)) |
809 | { |
809 | { |
810 | flags |= bgPixmap_t::tintNeeded; |
810 | flags |= bgPixmap_t::tintNeeded; |
811 | } |
811 | } |
812 | } |
812 | } |
813 | |
813 | |
814 | if (flags & bgPixmap_t::tintNeeded) |
814 | if (flags & bgPixmap_t::tintNeeded) |
815 | { |
815 | { |
816 | if (flags & bgPixmap_t::tintWholesome) |
816 | if (flags & bgPixmap_t::tintWholesome) |
… | |
… | |
845 | { |
845 | { |
846 | unsigned long new_flags = compute_tint_shade_flags (NULL, shade); |
846 | unsigned long new_flags = compute_tint_shade_flags (NULL, shade); |
847 | |
847 | |
848 | if (new_flags != (flags & tintFlags)) |
848 | if (new_flags != (flags & tintFlags)) |
849 | { |
849 | { |
850 | flags = (flags&~tintFlags)|new_flags; |
850 | flags = (flags&~tintFlags)|new_flags; |
851 | return true; |
851 | return true; |
852 | } |
852 | } |
853 | |
853 | |
854 | return false; |
854 | return false; |
855 | } |
855 | } |
856 | |
856 | |
… | |
… | |
941 | |
941 | |
942 | attr.background_pixmap = ParentRelative; |
942 | attr.background_pixmap = ParentRelative; |
943 | attr.backing_store = Always; |
943 | attr.backing_store = Always; |
944 | attr.event_mask = ExposureMask; |
944 | attr.event_mask = ExposureMask; |
945 | attr.override_redirect = True; |
945 | attr.override_redirect = True; |
946 | src = XCreateWindow (dpy, root, sx, sy, window_width, window_height, 0, |
946 | src = XCreateWindow (dpy, root, sx, sy, window_width, window_height, 0, |
947 | CopyFromParent, CopyFromParent, CopyFromParent, |
947 | CopyFromParent, CopyFromParent, CopyFromParent, |
948 | CWBackPixmap|CWBackingStore|CWOverrideRedirect|CWEventMask, |
948 | CWBackPixmap|CWBackingStore|CWOverrideRedirect|CWEventMask, |
949 | &attr); |
949 | &attr); |
950 | |
950 | |
951 | if (src != None) |
951 | if (src != None) |
… | |
… | |
975 | XDestroyWindow (dpy, src); |
975 | XDestroyWindow (dpy, src); |
976 | XUngrabServer (dpy); |
976 | XUngrabServer (dpy); |
977 | //fprintf (stderr, "%s:%d: ev_count = %d\n", __FUNCTION__, __LINE__, ev_count); |
977 | //fprintf (stderr, "%s:%d: ev_count = %d\n", __FUNCTION__, __LINE__, ev_count); |
978 | } |
978 | } |
979 | |
979 | |
980 | if (!success) |
980 | if (!success) |
981 | { |
981 | { |
982 | XFreePixmap (dpy, tiled_root_pmap); |
982 | XFreePixmap (dpy, tiled_root_pmap); |
983 | tiled_root_pmap = None; |
983 | tiled_root_pmap = None; |
984 | } |
984 | } |
985 | else |
985 | else |
986 | result |= transpPmapTiled; |
986 | result |= transpPmapTiled; |
987 | } |
987 | } |
988 | else |
988 | else |
989 | { |
989 | { |
990 | /* straightforward pixmap copy */ |
990 | /* straightforward pixmap copy */ |
991 | gcv.tile = root_pixmap; |
991 | gcv.tile = root_pixmap; |
… | |
… | |
1108 | # if DO_TIMING_TEST |
1108 | # if DO_TIMING_TEST |
1109 | XSync (dpy, False); |
1109 | XSync (dpy, False); |
1110 | # endif |
1110 | # endif |
1111 | # endif |
1111 | # endif |
1112 | } |
1112 | } |
1113 | } |
1113 | } |
1114 | } /* server side rendering completed */ |
1114 | } /* server side rendering completed */ |
1115 | |
1115 | |
1116 | if (pixmap) |
1116 | if (pixmap) |
1117 | XFreePixmap (dpy, pixmap); |
1117 | XFreePixmap (dpy, pixmap); |
1118 | |
1118 | |
… | |
… | |
1168 | /* we need to re-generate transparency pixmap in that case ! */ |
1168 | /* we need to re-generate transparency pixmap in that case ! */ |
1169 | background_flags = make_transparency_pixmap (); |
1169 | background_flags = make_transparency_pixmap (); |
1170 | if (background_flags == 0) |
1170 | if (background_flags == 0) |
1171 | return false; |
1171 | return false; |
1172 | else if ((background_flags & transpTransformations) == (flags & transpTransformations) |
1172 | else if ((background_flags & transpTransformations) == (flags & transpTransformations) |
1173 | && pmap_depth == target->depth) |
1173 | && pmap_depth == target->depth) |
1174 | flags = flags & ~isInvalid; |
1174 | flags = flags & ~isInvalid; |
1175 | } |
1175 | } |
1176 | # endif |
1176 | # endif |
1177 | |
1177 | |
1178 | # ifdef HAVE_AFTERIMAGE |
1178 | # ifdef HAVE_AFTERIMAGE |
… | |
… | |
1242 | |
1242 | |
1243 | XFreeGC (target->dpy, gc); |
1243 | XFreeGC (target->dpy, gc); |
1244 | flags = flags & ~isInvalid; |
1244 | flags = flags & ~isInvalid; |
1245 | } |
1245 | } |
1246 | |
1246 | |
1247 | XDestroyImage (result); |
1247 | XDestroyImage (result); |
1248 | } |
1248 | } |
1249 | |
1249 | |
1250 | if (flags & isInvalid) |
1250 | if (flags & isInvalid) |
1251 | { |
1251 | { |
1252 | if (pixmap != None) |
1252 | if (pixmap != None) |