… | |
… | |
58 | # endif |
58 | # endif |
59 | |
59 | |
60 | void |
60 | void |
61 | rxvt_term::bg_destroy () |
61 | rxvt_term::bg_destroy () |
62 | { |
62 | { |
|
|
63 | # ifdef BG_IMAGE_FROM_FILE |
|
|
64 | for (vector<rxvt_image>::iterator bg_image = image_vec.begin (); bg_image < image_vec.end (); bg_image++) |
|
|
65 | bg_image->destroy (); |
|
|
66 | # endif |
|
|
67 | |
63 | if (bg_pixmap) |
68 | if (bg_pixmap) |
64 | XFreePixmap (dpy, bg_pixmap); |
69 | XFreePixmap (dpy, bg_pixmap); |
65 | } |
70 | } |
66 | |
71 | |
67 | bool |
72 | bool |
… | |
… | |
85 | if (bg_flags & BG_IS_TRANSPARENT) |
90 | if (bg_flags & BG_IS_TRANSPARENT) |
86 | return true; |
91 | return true; |
87 | # endif |
92 | # endif |
88 | |
93 | |
89 | # ifdef BG_IMAGE_FROM_FILE |
94 | # ifdef BG_IMAGE_FROM_FILE |
90 | if (bg_image.flags & IM_IS_SET) |
95 | for (vector<rxvt_image>::iterator bg_image = image_vec.begin (); bg_image < image_vec.end (); bg_image++) |
91 | { |
96 | { |
92 | if ((bg_image.flags & IM_IS_SIZE_SENSITIVE) |
97 | if ((bg_image->flags & IM_IS_SIZE_SENSITIVE) |
93 | || bg_image.width () > szHint.width |
98 | || bg_image->width () > szHint.width |
94 | || bg_image.height () > szHint.height) |
99 | || bg_image->height () > szHint.height) |
95 | return true; |
100 | return true; |
96 | } |
101 | } |
97 | # endif |
102 | # endif |
98 | |
103 | |
99 | return false; |
104 | return false; |
… | |
… | |
106 | if (bg_flags & BG_IS_TRANSPARENT) |
111 | if (bg_flags & BG_IS_TRANSPARENT) |
107 | return true; |
112 | return true; |
108 | # endif |
113 | # endif |
109 | |
114 | |
110 | # ifdef BG_IMAGE_FROM_FILE |
115 | # ifdef BG_IMAGE_FROM_FILE |
111 | if (bg_image.flags & IM_IS_SET) |
116 | for (vector<rxvt_image>::iterator bg_image = image_vec.begin (); bg_image < image_vec.end (); bg_image++) |
112 | { |
117 | { |
113 | if (bg_image.flags & IM_ROOT_ALIGN) |
118 | if (bg_image->flags & IM_ROOT_ALIGN) |
114 | return true; |
119 | return true; |
115 | } |
120 | } |
116 | # endif |
121 | # endif |
117 | |
122 | |
118 | return false; |
123 | return false; |
… | |
… | |
145 | |
150 | |
146 | min_it (dst_size, target_size - dst_pos); |
151 | min_it (dst_size, target_size - dst_pos); |
147 | return src_pos; |
152 | return src_pos; |
148 | } |
153 | } |
149 | |
154 | |
|
|
155 | static void |
|
|
156 | parse_style (const char *style, int &x, int &y, unsigned int &w, unsigned int &h, uint8_t &flags) |
|
|
157 | { |
|
|
158 | if (!strcasecmp (style, "tiled")) |
|
|
159 | { |
|
|
160 | flags = IM_TILE; |
|
|
161 | w = h = noScale; |
|
|
162 | x = y = 0; |
|
|
163 | } |
|
|
164 | else if (!strcasecmp (style, "aspect-stretched")) |
|
|
165 | { |
|
|
166 | flags = IM_KEEP_ASPECT; |
|
|
167 | w = h = windowScale; |
|
|
168 | x = y = centerAlign; |
|
|
169 | } |
|
|
170 | else if (!strcasecmp (style, "stretched")) |
|
|
171 | { |
|
|
172 | flags = 0; |
|
|
173 | w = h = windowScale; |
|
|
174 | x = y = centerAlign; |
|
|
175 | } |
|
|
176 | else if (!strcasecmp (style, "centered")) |
|
|
177 | { |
|
|
178 | flags = 0; |
|
|
179 | w = h = noScale; |
|
|
180 | x = y = centerAlign; |
|
|
181 | } |
|
|
182 | else if (!strcasecmp (style, "root-tiled")) |
|
|
183 | { |
|
|
184 | flags = IM_TILE|IM_ROOT_ALIGN; |
|
|
185 | w = h = noScale; |
|
|
186 | x = y = 0; |
|
|
187 | } |
|
|
188 | } |
|
|
189 | |
150 | bool |
190 | bool |
151 | rxvt_image::set_geometry (const char *geom, bool update) |
191 | rxvt_image::set_geometry (const char *geom, bool update) |
152 | { |
192 | { |
153 | bool changed = false; |
193 | bool changed = false; |
154 | int geom_flags = 0; |
194 | int geom_flags = 0; |
155 | int x = h_align; |
195 | int x = h_align; |
156 | int y = v_align; |
196 | int y = v_align; |
157 | unsigned int w = h_scale; |
197 | unsigned int w = h_scale; |
158 | unsigned int h = v_scale; |
198 | unsigned int h = v_scale; |
159 | unsigned long new_flags = 0; |
199 | uint8_t new_flags = 0; |
160 | |
200 | |
161 | if (geom == NULL) |
201 | if (geom == NULL) |
162 | return false; |
202 | return false; |
163 | |
203 | |
164 | if (geom[0]) |
204 | if (geom[0]) |
165 | { |
205 | { |
166 | char **arr = rxvt_strsplit (':', geom); |
206 | char **arr = rxvt_strsplit (':', geom); |
167 | |
207 | |
168 | for (int i = 0; arr[i]; i++) |
208 | for (int i = 0; arr[i]; i++) |
169 | { |
209 | { |
170 | if (!strcasecmp (arr[i], "style=tiled")) |
210 | if (!strncasecmp (arr[i], "style=", 6)) |
171 | { |
211 | { |
172 | new_flags = IM_TILE; |
212 | parse_style (arr[i] + 6, x, y, w, h, new_flags); |
173 | w = h = noScale; |
|
|
174 | x = y = 0; |
|
|
175 | geom_flags = WidthValue|HeightValue|XValue|YValue; |
213 | geom_flags = WidthValue|HeightValue|XValue|YValue; |
176 | } |
|
|
177 | else if (!strcasecmp (arr[i], "style=aspect-stretched")) |
|
|
178 | { |
|
|
179 | new_flags = IM_KEEP_ASPECT; |
|
|
180 | w = h = windowScale; |
|
|
181 | x = y = centerAlign; |
|
|
182 | geom_flags = WidthValue|HeightValue|XValue|YValue; |
|
|
183 | } |
|
|
184 | else if (!strcasecmp (arr[i], "style=stretched")) |
|
|
185 | { |
|
|
186 | new_flags = 0; |
|
|
187 | w = h = windowScale; |
|
|
188 | geom_flags = WidthValue|HeightValue; |
|
|
189 | } |
|
|
190 | else if (!strcasecmp (arr[i], "style=centered")) |
|
|
191 | { |
|
|
192 | new_flags = 0; |
|
|
193 | w = h = noScale; |
|
|
194 | x = y = centerAlign; |
|
|
195 | geom_flags = WidthValue|HeightValue|XValue|YValue; |
|
|
196 | } |
|
|
197 | else if (!strcasecmp (arr[i], "style=root-tiled")) |
|
|
198 | { |
|
|
199 | new_flags = IM_TILE|IM_ROOT_ALIGN; |
|
|
200 | w = h = noScale; |
|
|
201 | geom_flags = WidthValue|HeightValue; |
|
|
202 | } |
214 | } |
203 | else if (!strcasecmp (arr[i], "op=tile")) |
215 | else if (!strcasecmp (arr[i], "op=tile")) |
204 | new_flags |= IM_TILE; |
216 | new_flags |= IM_TILE; |
205 | else if (!strcasecmp (arr[i], "op=keep-aspect")) |
217 | else if (!strcasecmp (arr[i], "op=keep-aspect")) |
206 | new_flags |= IM_KEEP_ASPECT; |
218 | new_flags |= IM_KEEP_ASPECT; |
… | |
… | |
291 | h_align = x; |
303 | h_align = x; |
292 | v_align = y; |
304 | v_align = y; |
293 | changed = true; |
305 | changed = true; |
294 | } |
306 | } |
295 | |
307 | |
296 | if (!(flags & IM_TILE) |
308 | if (is_size_sensitive ()) |
297 | || h_scale || v_scale |
|
|
298 | || (!(flags & IM_ROOT_ALIGN) && (h_align || v_align))) |
|
|
299 | flags |= IM_IS_SIZE_SENSITIVE; |
309 | flags |= IM_IS_SIZE_SENSITIVE; |
300 | else |
310 | else |
301 | flags &= ~IM_IS_SIZE_SENSITIVE; |
311 | flags &= ~IM_IS_SIZE_SENSITIVE; |
302 | |
312 | |
303 | return changed; |
313 | return changed; |
… | |
… | |
341 | |
351 | |
342 | # ifdef HAVE_PIXBUF |
352 | # ifdef HAVE_PIXBUF |
343 | bool |
353 | bool |
344 | rxvt_term::pixbuf_to_pixmap (GdkPixbuf *pixbuf, Pixmap pixmap, GC gc, |
354 | rxvt_term::pixbuf_to_pixmap (GdkPixbuf *pixbuf, Pixmap pixmap, GC gc, |
345 | int src_x, int src_y, int dst_x, int dst_y, |
355 | int src_x, int src_y, int dst_x, int dst_y, |
346 | unsigned int width, unsigned int height) |
356 | unsigned int width, unsigned int height, bool argb) |
347 | { |
357 | { |
348 | XImage *ximage; |
358 | XImage *ximage; |
349 | char *line; |
359 | char *line; |
350 | int width_r, width_g, width_b, width_a; |
360 | int width_r, width_g, width_b, width_a; |
351 | int sh_r, sh_g, sh_b, sh_a; |
361 | int sh_r, sh_g, sh_b, sh_a; |
352 | uint32_t alpha_mask; |
362 | uint32_t red_mask, green_mask, blue_mask, alpha_mask; |
353 | int rowstride; |
363 | int rowstride; |
354 | int channels; |
364 | int channels; |
355 | unsigned char *row; |
365 | unsigned char *row; |
356 | |
366 | |
357 | if (visual->c_class != TrueColor) |
367 | if (visual->c_class != TrueColor) |
358 | return false; |
368 | return false; |
359 | |
369 | |
|
|
370 | if (argb) |
|
|
371 | { |
|
|
372 | red_mask = 0xff << 16; |
|
|
373 | green_mask = 0xff << 8; |
|
|
374 | blue_mask = 0xff; |
|
|
375 | alpha_mask = 0xff << 24; |
|
|
376 | } |
|
|
377 | else |
|
|
378 | { |
|
|
379 | red_mask = visual->red_mask; |
|
|
380 | green_mask = visual->green_mask; |
|
|
381 | blue_mask = visual->blue_mask; |
360 | #if XRENDER |
382 | #if XRENDER |
361 | XRenderPictFormat *format = XRenderFindVisualFormat (dpy, visual); |
383 | XRenderPictFormat *format = XRenderFindVisualFormat (dpy, visual); |
362 | if (format) |
384 | if (format) |
363 | alpha_mask = (uint32_t)format->direct.alphaMask << format->direct.alpha; |
385 | alpha_mask = (uint32_t)format->direct.alphaMask << format->direct.alpha; |
364 | else |
386 | else |
365 | #endif |
387 | #endif |
366 | alpha_mask = 0; |
388 | alpha_mask = 0; |
|
|
389 | } |
367 | |
390 | |
368 | width_r = ecb_popcount32 (visual->red_mask); |
391 | width_r = ecb_popcount32 (red_mask); |
369 | width_g = ecb_popcount32 (visual->green_mask); |
392 | width_g = ecb_popcount32 (green_mask); |
370 | width_b = ecb_popcount32 (visual->blue_mask); |
393 | width_b = ecb_popcount32 (blue_mask); |
371 | width_a = ecb_popcount32 (alpha_mask); |
394 | width_a = ecb_popcount32 (alpha_mask); |
372 | |
395 | |
373 | if (width_r > 8 || width_g > 8 || width_b > 8 || width_a > 8) |
396 | if (width_r > 8 || width_g > 8 || width_b > 8 || width_a > 8) |
374 | return false; |
397 | return false; |
375 | |
398 | |
376 | sh_r = ecb_ctz32 (visual->red_mask); |
399 | sh_r = ecb_ctz32 (red_mask); |
377 | sh_g = ecb_ctz32 (visual->green_mask); |
400 | sh_g = ecb_ctz32 (green_mask); |
378 | sh_b = ecb_ctz32 (visual->blue_mask); |
401 | sh_b = ecb_ctz32 (blue_mask); |
379 | sh_a = ecb_ctz32 (alpha_mask); |
402 | sh_a = ecb_ctz32 (alpha_mask); |
380 | |
403 | |
381 | if (width > 32767 || height > 32767) |
404 | if (width > 32767 || height > 32767) |
382 | return false; |
405 | return false; |
383 | |
406 | |
384 | ximage = XCreateImage (dpy, visual, depth, ZPixmap, 0, 0, |
407 | ximage = XCreateImage (dpy, visual, argb ? 32 : depth, ZPixmap, 0, 0, |
385 | width, height, 32, 0); |
408 | width, height, 32, 0); |
386 | if (!ximage) |
409 | if (!ximage) |
387 | return false; |
410 | return false; |
388 | |
411 | |
389 | if (height > INT_MAX / ximage->bytes_per_line |
412 | if (height > INT_MAX / ximage->bytes_per_line |
… | |
… | |
461 | return false; |
484 | return false; |
462 | |
485 | |
463 | bool need_blend = bg_flags & BG_IS_VALID; |
486 | bool need_blend = bg_flags & BG_IS_VALID; |
464 | |
487 | |
465 | if (need_blend |
488 | if (need_blend |
466 | && !(bg_flags & BG_HAS_RENDER)) |
489 | && !(display->flags & DISPLAY_HAS_RENDER)) |
467 | return false; |
490 | return false; |
468 | |
491 | |
469 | GdkPixbuf *result; |
492 | GdkPixbuf *result; |
470 | |
493 | |
471 | int image_width = gdk_pixbuf_get_width (pixbuf); |
494 | int image_width = gdk_pixbuf_get_width (pixbuf); |
… | |
… | |
511 | |
534 | |
512 | image_width = gdk_pixbuf_get_width (result); |
535 | image_width = gdk_pixbuf_get_width (result); |
513 | image_height = gdk_pixbuf_get_height (result); |
536 | image_height = gdk_pixbuf_get_height (result); |
514 | |
537 | |
515 | if (need_blend) |
538 | if (need_blend) |
516 | { |
539 | tmp_pixmap = XCreatePixmap (dpy, vt, new_pmap_width, new_pmap_height, 32); |
517 | tmp_pixmap = bg_pixmap; |
|
|
518 | bg_pixmap = None; |
|
|
519 | } |
|
|
520 | else |
540 | else |
521 | { |
541 | { |
|
|
542 | // optimise bg pixmap size when tiling, but only if there are no |
|
|
543 | // other pixbufs to render. Otherwise, the bg pixmap size must |
|
|
544 | // be equal to the window size. |
522 | if (image.flags & IM_TILE) |
545 | if ((image.flags & IM_TILE) |
|
|
546 | && image_vec.size () == 1) |
523 | { |
547 | { |
524 | new_pmap_width = min (image_width, target_width); |
548 | new_pmap_width = min (image_width, target_width); |
525 | new_pmap_height = min (image_height, target_height); |
549 | new_pmap_height = min (image_height, target_height); |
526 | } |
550 | } |
527 | } |
|
|
528 | |
551 | |
529 | if (bg_pixmap == None |
552 | if (bg_pixmap == None |
530 | || bg_pmap_width != new_pmap_width |
553 | || bg_pmap_width != new_pmap_width |
531 | || bg_pmap_height != new_pmap_height) |
554 | || bg_pmap_height != new_pmap_height) |
532 | { |
555 | { |
533 | if (bg_pixmap) |
556 | if (bg_pixmap) |
534 | XFreePixmap (dpy, bg_pixmap); |
557 | XFreePixmap (dpy, bg_pixmap); |
535 | bg_pixmap = XCreatePixmap (dpy, vt, new_pmap_width, new_pmap_height, depth); |
558 | bg_pixmap = XCreatePixmap (dpy, vt, new_pmap_width, new_pmap_height, depth); |
536 | bg_pmap_width = new_pmap_width; |
559 | bg_pmap_width = new_pmap_width; |
537 | bg_pmap_height = new_pmap_height; |
560 | bg_pmap_height = new_pmap_height; |
|
|
561 | } |
|
|
562 | |
|
|
563 | tmp_pixmap = bg_pixmap; |
538 | } |
564 | } |
539 | |
565 | |
540 | gcv.foreground = pix_colors[Color_bg]; |
566 | gcv.foreground = pix_colors[Color_bg]; |
541 | gc = XCreateGC (dpy, vt, GCForeground, &gcv); |
567 | gc = XCreateGC (dpy, tmp_pixmap, GCForeground, &gcv); |
542 | |
568 | |
543 | if (gc) |
569 | if (gc) |
544 | { |
570 | { |
545 | if (image.flags & IM_TILE) |
571 | if (image.flags & IM_TILE) |
546 | { |
572 | { |
547 | Pixmap tile = XCreatePixmap (dpy, vt, image_width, image_height, depth); |
573 | Pixmap tile = XCreatePixmap (dpy, vt, image_width, image_height, need_blend ? 32 : depth); |
548 | pixbuf_to_pixmap (result, tile, gc, |
574 | pixbuf_to_pixmap (result, tile, gc, |
549 | 0, 0, |
575 | 0, 0, |
550 | 0, 0, |
576 | 0, 0, |
551 | image_width, image_height); |
577 | image_width, image_height, need_blend); |
552 | |
578 | |
553 | gcv.tile = tile; |
579 | gcv.tile = tile; |
554 | gcv.fill_style = FillTiled; |
580 | gcv.fill_style = FillTiled; |
555 | gcv.ts_x_origin = x; |
581 | gcv.ts_x_origin = x; |
556 | gcv.ts_y_origin = y; |
582 | gcv.ts_y_origin = y; |
557 | XChangeGC (dpy, gc, GCFillStyle | GCTile | GCTileStipXOrigin | GCTileStipYOrigin, &gcv); |
583 | XChangeGC (dpy, gc, GCFillStyle | GCTile | GCTileStipXOrigin | GCTileStipYOrigin, &gcv); |
558 | |
584 | |
559 | XFillRectangle (dpy, bg_pixmap, gc, 0, 0, new_pmap_width, new_pmap_height); |
585 | XFillRectangle (dpy, tmp_pixmap, gc, 0, 0, new_pmap_width, new_pmap_height); |
560 | XFreePixmap (dpy, tile); |
586 | XFreePixmap (dpy, tile); |
561 | } |
587 | } |
562 | else |
588 | else |
563 | { |
589 | { |
564 | int src_x, src_y, dst_x, dst_y; |
590 | int src_x, src_y, dst_x, dst_y; |
… | |
… | |
568 | src_y = make_clip_rectangle (y, image_height, new_pmap_height, dst_y, dst_height); |
594 | src_y = make_clip_rectangle (y, image_height, new_pmap_height, dst_y, dst_height); |
569 | |
595 | |
570 | if (dst_x > 0 || dst_y > 0 |
596 | if (dst_x > 0 || dst_y > 0 |
571 | || dst_x + dst_width < new_pmap_width |
597 | || dst_x + dst_width < new_pmap_width |
572 | || dst_y + dst_height < new_pmap_height) |
598 | || dst_y + dst_height < new_pmap_height) |
573 | XFillRectangle (dpy, bg_pixmap, gc, 0, 0, new_pmap_width, new_pmap_height); |
599 | XFillRectangle (dpy, tmp_pixmap, gc, 0, 0, new_pmap_width, new_pmap_height); |
574 | |
600 | |
575 | if (dst_x < new_pmap_width && dst_y < new_pmap_height) |
601 | if (dst_x < new_pmap_width && dst_y < new_pmap_height) |
576 | pixbuf_to_pixmap (result, bg_pixmap, gc, |
602 | pixbuf_to_pixmap (result, tmp_pixmap, gc, |
577 | src_x, src_y, |
603 | src_x, src_y, |
578 | dst_x, dst_y, |
604 | dst_x, dst_y, |
579 | dst_width, dst_height); |
605 | dst_width, dst_height, need_blend); |
580 | } |
606 | } |
|
|
607 | |
|
|
608 | if (image.need_blur ()) |
|
|
609 | blur_pixmap (tmp_pixmap, new_pmap_width, new_pmap_height, need_blend, image.h_blurRadius, image.v_blurRadius); |
|
|
610 | if (image.need_tint ()) |
|
|
611 | tint_pixmap (tmp_pixmap, new_pmap_width, new_pmap_height, need_blend, image.tint, image.tint_set, image.shade); |
581 | |
612 | |
582 | #if XRENDER |
613 | #if XRENDER |
583 | if (need_blend) |
614 | if (need_blend) |
584 | { |
615 | { |
|
|
616 | XRenderPictFormat *argb_format = XRenderFindStandardFormat (dpy, PictStandardARGB32); |
585 | XRenderPictFormat *format = XRenderFindVisualFormat (dpy, visual); |
617 | XRenderPictFormat *format = XRenderFindVisualFormat (dpy, visual); |
586 | |
618 | |
587 | Picture src = XRenderCreatePicture (dpy, tmp_pixmap, format, 0, 0); |
619 | Picture src = XRenderCreatePicture (dpy, tmp_pixmap, argb_format, 0, 0); |
588 | |
620 | |
589 | Picture dst = XRenderCreatePicture (dpy, bg_pixmap, format, 0, 0); |
621 | Picture dst = XRenderCreatePicture (dpy, bg_pixmap, format, 0, 0); |
590 | |
622 | |
591 | Picture mask = create_xrender_mask (dpy, vt, False, False); |
623 | Picture mask = create_xrender_mask (dpy, vt, False, False); |
592 | |
624 | |
593 | XRenderColor mask_c; |
625 | XRenderColor mask_c; |
594 | |
626 | |
595 | mask_c.alpha = 0x8000; |
627 | mask_c.alpha = image.alpha; |
596 | mask_c.red = |
628 | mask_c.red = |
597 | mask_c.green = |
629 | mask_c.green = |
598 | mask_c.blue = 0; |
630 | mask_c.blue = 0; |
599 | XRenderFillRectangle (dpy, PictOpSrc, mask, &mask_c, 0, 0, 1, 1); |
631 | XRenderFillRectangle (dpy, PictOpSrc, mask, &mask_c, 0, 0, 1, 1); |
600 | |
632 | |
… | |
… | |
619 | |
651 | |
620 | return ret; |
652 | return ret; |
621 | } |
653 | } |
622 | # endif /* HAVE_PIXBUF */ |
654 | # endif /* HAVE_PIXBUF */ |
623 | |
655 | |
|
|
656 | # ifndef NO_RESOURCES |
|
|
657 | static int |
|
|
658 | rxvt_define_image (XrmDatabase *database ecb_unused, |
|
|
659 | XrmBindingList bindings ecb_unused, |
|
|
660 | XrmQuarkList quarks, |
|
|
661 | XrmRepresentation *type ecb_unused, |
|
|
662 | XrmValue *value, |
|
|
663 | XPointer closure ecb_unused) |
|
|
664 | { |
|
|
665 | int size; |
|
|
666 | |
|
|
667 | for (size = 0; quarks[size] != NULLQUARK; size++) |
|
|
668 | ; |
|
|
669 | |
|
|
670 | if (size >= 2) |
|
|
671 | { |
|
|
672 | int id = strtol (XrmQuarkToString (quarks[size-2]), 0, 0); |
|
|
673 | if (id >= 1) |
|
|
674 | GET_R->parse_image (id, XrmQuarkToString (quarks[size-1]), (char *)value->addr); |
|
|
675 | } |
|
|
676 | return False; |
|
|
677 | } |
|
|
678 | # endif |
|
|
679 | |
|
|
680 | void |
|
|
681 | rxvt_term::parse_image (int id, const char *type, const char *arg) |
|
|
682 | { |
|
|
683 | if (image_vec.size () < id + 1) |
|
|
684 | image_vec.resize (id + 1); |
|
|
685 | |
|
|
686 | rxvt_image *image = &image_vec[id]; |
|
|
687 | } |
|
|
688 | |
|
|
689 | rxvt_image::rxvt_image () |
|
|
690 | { |
|
|
691 | alpha = 0xffff; |
|
|
692 | flags = 0; |
|
|
693 | h_scale = |
|
|
694 | v_scale = defaultScale; |
|
|
695 | h_align = |
|
|
696 | v_align = defaultAlign; |
|
|
697 | |
|
|
698 | # ifdef HAVE_PIXBUF |
|
|
699 | pixbuf = 0; |
|
|
700 | # endif |
|
|
701 | } |
|
|
702 | |
624 | bool |
703 | bool |
625 | rxvt_image::set_file (const char *file) |
704 | rxvt_image::set_file_geometry (const char *file) |
626 | { |
705 | { |
627 | if (!file || !*file) |
706 | if (!file || !*file) |
628 | return false; |
707 | return false; |
629 | |
708 | |
630 | bool ret = false; |
|
|
631 | const char *p = strchr (file, ';'); |
709 | const char *p = strchr (file, ';'); |
632 | |
710 | |
633 | if (p) |
711 | if (p) |
634 | { |
712 | { |
635 | size_t len = p - file; |
713 | size_t len = p - file; |
… | |
… | |
637 | memcpy (f, file, len); |
715 | memcpy (f, file, len); |
638 | f[len] = '\0'; |
716 | f[len] = '\0'; |
639 | file = f; |
717 | file = f; |
640 | } |
718 | } |
641 | |
719 | |
|
|
720 | bool ret = set_file (file); |
|
|
721 | alpha = 0x8000; |
|
|
722 | if (ret) |
|
|
723 | set_geometry (p ? p + 1 : ""); |
|
|
724 | return ret; |
|
|
725 | } |
|
|
726 | |
|
|
727 | bool |
|
|
728 | rxvt_image::set_file (const char *file) |
|
|
729 | { |
|
|
730 | bool ret = false; |
|
|
731 | |
642 | # ifdef HAVE_PIXBUF |
732 | # ifdef HAVE_PIXBUF |
643 | GdkPixbuf *image = gdk_pixbuf_new_from_file (file, NULL); |
733 | GdkPixbuf *image = gdk_pixbuf_new_from_file (file, NULL); |
644 | if (image) |
734 | if (image) |
645 | { |
735 | { |
646 | if (pixbuf) |
736 | if (pixbuf) |
… | |
… | |
649 | ret = true; |
739 | ret = true; |
650 | } |
740 | } |
651 | # endif |
741 | # endif |
652 | |
742 | |
653 | if (ret) |
743 | if (ret) |
654 | { |
744 | flags |= IM_IS_SET; |
655 | flags = IM_IS_SET | IM_IS_SIZE_SENSITIVE; |
|
|
656 | h_scale = v_scale = defaultScale; |
|
|
657 | h_align = v_align = defaultAlign; |
|
|
658 | |
|
|
659 | if (p) |
|
|
660 | set_geometry (p + 1); |
|
|
661 | } |
|
|
662 | |
745 | |
663 | return ret; |
746 | return ret; |
664 | } |
747 | } |
665 | |
748 | |
666 | # endif /* BG_IMAGE_FROM_FILE */ |
749 | # endif /* BG_IMAGE_FROM_FILE */ |
667 | |
750 | |
668 | # ifdef ENABLE_TRANSPARENCY |
|
|
669 | bool |
751 | bool |
670 | rxvt_term::bg_set_blur (const char *geom) |
752 | image_effects::set_blur (const char *geom) |
671 | { |
753 | { |
672 | bool changed = false; |
754 | bool changed = false; |
673 | unsigned int hr, vr; |
755 | unsigned int hr, vr; |
674 | int junk; |
756 | int junk; |
675 | int geom_flags = XParseGeometry (geom, &junk, &junk, &hr, &vr); |
757 | int geom_flags = XParseGeometry (geom, &junk, &junk, &hr, &vr); |
… | |
… | |
696 | |
778 | |
697 | return changed; |
779 | return changed; |
698 | } |
780 | } |
699 | |
781 | |
700 | bool |
782 | bool |
701 | rxvt_term::bg_set_tint (rxvt_color &new_tint) |
783 | image_effects::set_tint (const rxvt_color &new_tint) |
702 | { |
784 | { |
703 | if (!(bg_flags & BG_TINT_SET) || tint != new_tint) |
785 | if (!tint_set || tint != new_tint) |
704 | { |
786 | { |
705 | tint = new_tint; |
787 | tint = new_tint; |
706 | bg_flags |= BG_TINT_SET; |
788 | tint_set = true; |
707 | |
|
|
708 | rgba c; |
|
|
709 | tint.get (c); |
|
|
710 | if ((c.r <= 0x00ff || c.r >= 0xff00) |
|
|
711 | && (c.g <= 0x00ff || c.g >= 0xff00) |
|
|
712 | && (c.b <= 0x00ff || c.b >= 0xff00)) |
|
|
713 | bg_flags |= BG_TINT_BITAND; |
|
|
714 | else |
|
|
715 | bg_flags &= ~BG_TINT_BITAND; |
|
|
716 | |
789 | |
717 | return true; |
790 | return true; |
718 | } |
791 | } |
719 | |
792 | |
720 | return false; |
793 | return false; |
721 | } |
794 | } |
722 | |
795 | |
723 | bool |
796 | bool |
724 | rxvt_term::bg_set_shade (const char *shade_str) |
797 | image_effects::set_shade (const char *shade_str) |
725 | { |
798 | { |
726 | int new_shade = atoi (shade_str); |
799 | int new_shade = atoi (shade_str); |
727 | |
800 | |
728 | clamp_it (new_shade, -100, 200); |
801 | clamp_it (new_shade, -100, 200); |
729 | if (new_shade < 0) |
802 | if (new_shade < 0) |
… | |
… | |
760 | params[i+2] = XDoubleToFixed (kernel[i] / sum); |
833 | params[i+2] = XDoubleToFixed (kernel[i] / sum); |
761 | } |
834 | } |
762 | #endif |
835 | #endif |
763 | |
836 | |
764 | bool |
837 | bool |
765 | rxvt_term::blur_pixmap (Pixmap pixmap, int width, int height) |
838 | rxvt_term::blur_pixmap (Pixmap pixmap, int width, int height, bool argb, int h_blurRadius, int v_blurRadius) |
766 | { |
839 | { |
767 | bool ret = false; |
840 | bool ret = false; |
768 | #if XRENDER |
841 | #if XRENDER |
769 | if (!(bg_flags & BG_HAS_RENDER_CONV)) |
842 | if (!(display->flags & DISPLAY_HAS_RENDER_CONV)) |
770 | return false; |
843 | return false; |
771 | |
844 | |
772 | int size = max (h_blurRadius, v_blurRadius) * 2 + 1; |
845 | int size = max (h_blurRadius, v_blurRadius) * 2 + 1; |
773 | double *kernel = (double *)malloc (size * sizeof (double)); |
846 | double *kernel = (double *)malloc (size * sizeof (double)); |
774 | XFixed *params = (XFixed *)malloc ((size + 2) * sizeof (XFixed)); |
847 | XFixed *params = (XFixed *)malloc ((size + 2) * sizeof (XFixed)); |
775 | |
848 | |
776 | XRenderPictureAttributes pa; |
849 | XRenderPictureAttributes pa; |
777 | XRenderPictFormat *format = XRenderFindVisualFormat (dpy, visual); |
850 | XRenderPictFormat *format = argb ? XRenderFindStandardFormat (dpy, PictStandardARGB32) |
|
|
851 | : XRenderFindVisualFormat (dpy, visual); |
778 | |
852 | |
779 | pa.repeat = RepeatPad; |
853 | pa.repeat = RepeatPad; |
780 | Picture src = XRenderCreatePicture (dpy, pixmap, format, CPRepeat, &pa); |
854 | Picture src = XRenderCreatePicture (dpy, pixmap, format, CPRepeat, &pa); |
781 | Pixmap tmp = XCreatePixmap (dpy, pixmap, width, height, depth); |
855 | Pixmap tmp = XCreatePixmap (dpy, pixmap, width, height, depth); |
782 | Picture dst = XRenderCreatePicture (dpy, tmp, format, CPRepeat, &pa); |
856 | Picture dst = XRenderCreatePicture (dpy, tmp, format, CPRepeat, &pa); |
… | |
… | |
825 | #endif |
899 | #endif |
826 | return ret; |
900 | return ret; |
827 | } |
901 | } |
828 | |
902 | |
829 | bool |
903 | bool |
830 | rxvt_term::tint_pixmap (Pixmap pixmap, int width, int height) |
904 | rxvt_term::tint_pixmap (Pixmap pixmap, int width, int height, bool argb, rxvt_color &tint, bool tint_set, int shade) |
831 | { |
905 | { |
832 | bool ret = false; |
906 | bool ret = false; |
833 | |
907 | |
834 | if (shade == 100 && (bg_flags & BG_TINT_BITAND)) |
908 | rgba c (rgba::MAX_CC, rgba::MAX_CC, rgba::MAX_CC); |
|
|
909 | |
|
|
910 | if (tint_set) |
|
|
911 | tint.get (c); |
|
|
912 | |
|
|
913 | if (shade == 100 |
|
|
914 | && (c.r <= 0x00ff || c.r >= 0xff00) |
|
|
915 | && (c.g <= 0x00ff || c.g >= 0xff00) |
|
|
916 | && (c.b <= 0x00ff || c.b >= 0xff00)) |
835 | { |
917 | { |
836 | XGCValues gcv; |
918 | XGCValues gcv; |
837 | GC gc; |
919 | GC gc; |
838 | |
920 | |
839 | /* In this case we can tint image server-side getting significant |
921 | /* In this case we can tint image server-side getting significant |
… | |
… | |
849 | ret = true; |
931 | ret = true; |
850 | XFreeGC (dpy, gc); |
932 | XFreeGC (dpy, gc); |
851 | } |
933 | } |
852 | } |
934 | } |
853 | # if XRENDER |
935 | # if XRENDER |
854 | else if (bg_flags & BG_HAS_RENDER) |
936 | else if (display->flags & DISPLAY_HAS_RENDER) |
855 | { |
937 | { |
856 | rgba c (rgba::MAX_CC, rgba::MAX_CC, rgba::MAX_CC); |
|
|
857 | |
|
|
858 | if (bg_flags & BG_TINT_SET) |
|
|
859 | tint.get (c); |
|
|
860 | |
|
|
861 | if (shade <= 100) |
938 | if (shade <= 100) |
862 | { |
939 | { |
863 | c.r = c.r * shade / 100; |
940 | c.r = c.r * shade / 100; |
864 | c.g = c.g * shade / 100; |
941 | c.g = c.g * shade / 100; |
865 | c.b = c.b * shade / 100; |
942 | c.b = c.b * shade / 100; |
… | |
… | |
869 | c.r = c.r * (200 - shade) / 100; |
946 | c.r = c.r * (200 - shade) / 100; |
870 | c.g = c.g * (200 - shade) / 100; |
947 | c.g = c.g * (200 - shade) / 100; |
871 | c.b = c.b * (200 - shade) / 100; |
948 | c.b = c.b * (200 - shade) / 100; |
872 | } |
949 | } |
873 | |
950 | |
874 | XRenderPictFormat *format = XRenderFindVisualFormat (dpy, visual); |
951 | XRenderPictFormat *format = argb ? XRenderFindStandardFormat (dpy, PictStandardARGB32) |
|
|
952 | : XRenderFindVisualFormat (dpy, visual); |
875 | |
953 | |
876 | Picture back_pic = XRenderCreatePicture (dpy, pixmap, format, 0, 0); |
954 | Picture back_pic = XRenderCreatePicture (dpy, pixmap, format, 0, 0); |
877 | |
955 | |
878 | Picture overlay_pic = create_xrender_mask (dpy, pixmap, True, False); |
956 | Picture overlay_pic = create_xrender_mask (dpy, pixmap, True, False); |
879 | |
957 | |
… | |
… | |
915 | # endif |
993 | # endif |
916 | |
994 | |
917 | return ret; |
995 | return ret; |
918 | } |
996 | } |
919 | |
997 | |
|
|
998 | # ifdef ENABLE_TRANSPARENCY |
920 | /* |
999 | /* |
921 | * Builds a pixmap of the same size as the terminal window that contains |
1000 | * Builds a pixmap of the same size as the terminal window that contains |
922 | * the tiled portion of the root pixmap that is supposed to be covered by |
1001 | * the tiled portion of the root pixmap that is supposed to be covered by |
923 | * our window. |
1002 | * our window. |
924 | */ |
1003 | */ |
925 | bool |
1004 | bool |
926 | rxvt_term::make_transparency_pixmap () |
1005 | rxvt_term::render_root_image () |
927 | { |
1006 | { |
928 | bool ret = false; |
1007 | bool ret = false; |
929 | |
1008 | |
930 | /* root dimensions may change from call to call - but Display structure should |
1009 | /* root dimensions may change from call to call - but Display structure should |
931 | * be always up-to-date, so let's use it : |
1010 | * be always up-to-date, so let's use it : |
… | |
… | |
967 | Pixmap recoded_root_pmap = root_pixmap; |
1046 | Pixmap recoded_root_pmap = root_pixmap; |
968 | |
1047 | |
969 | if (root_pixmap != None && root_depth != depth) |
1048 | if (root_pixmap != None && root_depth != depth) |
970 | { |
1049 | { |
971 | #if XRENDER |
1050 | #if XRENDER |
972 | if (bg_flags & BG_HAS_RENDER) |
1051 | if (display->flags & DISPLAY_HAS_RENDER) |
973 | { |
1052 | { |
974 | recoded_root_pmap = XCreatePixmap (dpy, vt, root_pmap_width, root_pmap_height, depth); |
1053 | recoded_root_pmap = XCreatePixmap (dpy, vt, root_pmap_width, root_pmap_height, depth); |
975 | |
1054 | |
976 | XRenderPictFormat *src_format = XRenderFindVisualFormat (dpy, DefaultVisual (dpy, screen)); |
1055 | XRenderPictFormat *src_format = XRenderFindVisualFormat (dpy, DefaultVisual (dpy, screen)); |
977 | Picture src = XRenderCreatePicture (dpy, root_pixmap, src_format, 0, 0); |
1056 | Picture src = XRenderCreatePicture (dpy, root_pixmap, src_format, 0, 0); |
… | |
… | |
1015 | |
1094 | |
1016 | if (gc) |
1095 | if (gc) |
1017 | { |
1096 | { |
1018 | XFillRectangle (dpy, bg_pixmap, gc, 0, 0, window_width, window_height); |
1097 | XFillRectangle (dpy, bg_pixmap, gc, 0, 0, window_width, window_height); |
1019 | ret = true; |
1098 | ret = true; |
1020 | bool need_blur = h_blurRadius && v_blurRadius; |
1099 | bool need_blur = root_effects.need_blur (); |
1021 | bool need_tint = shade != 100 || (bg_flags & BG_TINT_SET); |
1100 | bool need_tint = root_effects.need_tint (); |
1022 | |
1101 | |
1023 | if (!(bg_flags & BG_CLIENT_RENDER)) |
|
|
1024 | { |
|
|
1025 | if (need_blur) |
1102 | if (need_blur) |
|
|
1103 | { |
|
|
1104 | if (blur_pixmap (bg_pixmap, window_width, window_height, false, |
|
|
1105 | root_effects.h_blurRadius, root_effects.v_blurRadius)) |
|
|
1106 | need_blur = false; |
|
|
1107 | } |
|
|
1108 | if (need_tint) |
|
|
1109 | { |
|
|
1110 | if (tint_pixmap (bg_pixmap, window_width, window_height, false, |
|
|
1111 | root_effects.tint, root_effects.tint_set, root_effects.shade)) |
|
|
1112 | need_tint = false; |
|
|
1113 | } |
|
|
1114 | if (need_tint) |
|
|
1115 | { |
|
|
1116 | XImage *ximage = XGetImage (dpy, bg_pixmap, 0, 0, bg_pmap_width, bg_pmap_height, AllPlanes, ZPixmap); |
|
|
1117 | if (ximage) |
1026 | { |
1118 | { |
1027 | if (blur_pixmap (bg_pixmap, window_width, window_height)) |
1119 | /* our own client-side tinting */ |
1028 | need_blur = false; |
1120 | tint_ximage (ximage, root_effects.tint, root_effects.tint_set, root_effects.shade); |
|
|
1121 | |
|
|
1122 | XPutImage (dpy, bg_pixmap, gc, ximage, 0, 0, 0, 0, ximage->width, ximage->height); |
|
|
1123 | XDestroyImage (ximage); |
1029 | } |
1124 | } |
1030 | if (need_tint) |
|
|
1031 | { |
|
|
1032 | if (tint_pixmap (bg_pixmap, window_width, window_height)) |
|
|
1033 | need_tint = false; |
|
|
1034 | } |
1125 | } |
1035 | if (need_tint) |
|
|
1036 | { |
|
|
1037 | XImage *ximage = XGetImage (dpy, bg_pixmap, 0, 0, bg_pmap_width, bg_pmap_height, AllPlanes, ZPixmap); |
|
|
1038 | if (ximage) |
|
|
1039 | { |
|
|
1040 | /* our own client-side tinting */ |
|
|
1041 | tint_ximage (ximage); |
|
|
1042 | |
|
|
1043 | XPutImage (dpy, bg_pixmap, gc, ximage, 0, 0, 0, 0, ximage->width, ximage->height); |
|
|
1044 | XDestroyImage (ximage); |
|
|
1045 | } |
|
|
1046 | } |
|
|
1047 | } /* server side rendering completed */ |
|
|
1048 | |
1126 | |
1049 | XFreeGC (dpy, gc); |
1127 | XFreeGC (dpy, gc); |
1050 | } |
1128 | } |
1051 | |
1129 | |
1052 | if (recoded_root_pmap != root_pixmap) |
1130 | if (recoded_root_pmap != root_pixmap) |
… | |
… | |
1072 | bg_invalidate (); |
1150 | bg_invalidate (); |
1073 | # ifdef ENABLE_TRANSPARENCY |
1151 | # ifdef ENABLE_TRANSPARENCY |
1074 | if (bg_flags & BG_IS_TRANSPARENT) |
1152 | if (bg_flags & BG_IS_TRANSPARENT) |
1075 | { |
1153 | { |
1076 | /* we need to re-generate transparency pixmap in that case ! */ |
1154 | /* we need to re-generate transparency pixmap in that case ! */ |
1077 | if (make_transparency_pixmap ()) |
1155 | if (render_root_image ()) |
1078 | bg_flags |= BG_IS_VALID; |
1156 | bg_flags |= BG_IS_VALID; |
1079 | } |
1157 | } |
1080 | # endif |
1158 | # endif |
1081 | |
1159 | |
1082 | # ifdef BG_IMAGE_FROM_FILE |
1160 | # ifdef BG_IMAGE_FROM_FILE |
1083 | if (bg_image.flags & IM_IS_SET) |
1161 | for (vector<rxvt_image>::iterator bg_image = image_vec.begin (); bg_image < image_vec.end (); bg_image++) |
1084 | { |
1162 | { |
1085 | if (render_image (bg_image)) |
1163 | if (render_image (*bg_image)) |
1086 | bg_flags |= BG_IS_VALID; |
1164 | bg_flags |= BG_IS_VALID; |
1087 | } |
1165 | } |
1088 | # endif |
1166 | # endif |
1089 | |
1167 | |
1090 | if (!(bg_flags & BG_IS_VALID)) |
1168 | if (!(bg_flags & BG_IS_VALID)) |
… | |
… | |
1105 | } |
1183 | } |
1106 | |
1184 | |
1107 | void |
1185 | void |
1108 | rxvt_term::bg_init () |
1186 | rxvt_term::bg_init () |
1109 | { |
1187 | { |
1110 | #ifdef ENABLE_TRANSPARENCY |
1188 | #ifdef BG_IMAGE_FROM_FILE |
1111 | shade = 100; |
1189 | if (rs[Rs_backgroundPixmap]) |
|
|
1190 | { |
|
|
1191 | rxvt_image *image = new_image (); |
|
|
1192 | if (!image->set_file_geometry (rs[Rs_backgroundPixmap])) |
|
|
1193 | image_vec.pop_back (); |
|
|
1194 | } |
|
|
1195 | |
|
|
1196 | # ifndef NO_RESOURCES |
|
|
1197 | find_resources ("image", "Image", XrmEnumAllLevels, rxvt_define_image); |
|
|
1198 | # endif |
|
|
1199 | |
|
|
1200 | vector<rxvt_image>::iterator bg_image = image_vec.begin (); |
|
|
1201 | while (bg_image != image_vec.end ()) |
|
|
1202 | { |
|
|
1203 | if (!(bg_image->flags & IM_IS_SET)) |
|
|
1204 | bg_image = image_vec.erase (bg_image); |
|
|
1205 | else |
|
|
1206 | { |
|
|
1207 | if (bg_image->is_size_sensitive ()) |
|
|
1208 | bg_image->flags |= IM_IS_SIZE_SENSITIVE; |
|
|
1209 | |
|
|
1210 | bg_image++; |
|
|
1211 | } |
|
|
1212 | } |
|
|
1213 | |
|
|
1214 | if (image_vec.size () > 0 |
|
|
1215 | && !bg_window_position_sensitive ()) |
|
|
1216 | update_background (); |
1112 | #endif |
1217 | #endif |
1113 | |
|
|
1114 | bg_flags &= ~(BG_HAS_RENDER | BG_HAS_RENDER_CONV); |
|
|
1115 | #if XRENDER |
|
|
1116 | int major, minor; |
|
|
1117 | if (XRenderQueryVersion (dpy, &major, &minor)) |
|
|
1118 | bg_flags |= BG_HAS_RENDER; |
|
|
1119 | XFilters *filters = XRenderQueryFilters (dpy, vt); |
|
|
1120 | if (filters) |
|
|
1121 | { |
|
|
1122 | for (int i = 0; i < filters->nfilter; i++) |
|
|
1123 | if (!strcmp (filters->filter[i], FilterConvolution)) |
|
|
1124 | bg_flags |= BG_HAS_RENDER_CONV; |
|
|
1125 | |
|
|
1126 | XFree (filters); |
|
|
1127 | } |
|
|
1128 | #endif |
|
|
1129 | } |
1218 | } |
1130 | |
1219 | |
1131 | #endif /* HAVE_BG_PIXMAP */ |
|
|
1132 | |
|
|
1133 | #ifdef ENABLE_TRANSPARENCY |
|
|
1134 | /* based on code from aterm-0.4.2 */ |
1220 | /* based on code from aterm-0.4.2 */ |
1135 | |
1221 | |
1136 | static inline void |
1222 | static inline void |
1137 | fill_lut (uint32_t *lookup, uint32_t mask, int sh, unsigned short low, unsigned short high) |
1223 | fill_lut (uint32_t *lookup, uint32_t mask, int sh, unsigned short low, unsigned short high) |
1138 | { |
1224 | { |
… | |
… | |
1144 | lookup[i] = (tmp / 0xffff) << sh; |
1230 | lookup[i] = (tmp / 0xffff) << sh; |
1145 | } |
1231 | } |
1146 | } |
1232 | } |
1147 | |
1233 | |
1148 | void |
1234 | void |
1149 | rxvt_term::tint_ximage (XImage *ximage) |
1235 | rxvt_term::tint_ximage (XImage *ximage, rxvt_color &tint, bool tint_set, int shade) |
1150 | { |
1236 | { |
1151 | unsigned int size_r, size_g, size_b; |
1237 | unsigned int size_r, size_g, size_b; |
1152 | int sh_r, sh_g, sh_b; |
1238 | int sh_r, sh_g, sh_b; |
1153 | uint32_t mask_r, mask_g, mask_b; |
1239 | uint32_t mask_r, mask_g, mask_b; |
1154 | uint32_t *lookup, *lookup_r, *lookup_g, *lookup_b; |
1240 | uint32_t *lookup, *lookup_r, *lookup_g, *lookup_b; |
… | |
… | |
1179 | lookup_g = lookup + size_r; |
1265 | lookup_g = lookup + size_r; |
1180 | lookup_b = lookup + size_r + size_g; |
1266 | lookup_b = lookup + size_r + size_g; |
1181 | |
1267 | |
1182 | rgba c (rgba::MAX_CC, rgba::MAX_CC, rgba::MAX_CC); |
1268 | rgba c (rgba::MAX_CC, rgba::MAX_CC, rgba::MAX_CC); |
1183 | |
1269 | |
1184 | if (bg_flags & BG_TINT_SET) |
1270 | if (tint_set) |
1185 | tint.get (c); |
1271 | tint.get (c); |
1186 | |
1272 | |
1187 | /* prepare limits for color transformation (each channel is handled separately) */ |
1273 | /* prepare limits for color transformation (each channel is handled separately) */ |
1188 | if (shade > 100) |
1274 | if (shade > 100) |
1189 | { |
1275 | { |
… | |
… | |
1239 | } |
1325 | } |
1240 | } |
1326 | } |
1241 | |
1327 | |
1242 | free (lookup); |
1328 | free (lookup); |
1243 | } |
1329 | } |
1244 | #endif /* ENABLE_TRANSPARENCY */ |
1330 | |
|
|
1331 | #endif /* HAVE_BG_PIXMAP */ |