… | |
… | |
594 | GC gc; |
594 | GC gc; |
595 | |
595 | |
596 | /* create Pixmap */ |
596 | /* create Pixmap */ |
597 | if (pixmap == None |
597 | if (pixmap == None |
598 | || pmap_width != new_pmap_width |
598 | || pmap_width != new_pmap_width |
599 | || pmap_height != new_pmap_height |
599 | || pmap_height != new_pmap_height) |
600 | || pmap_depth != target->depth) |
|
|
601 | { |
600 | { |
602 | if (pixmap) |
601 | if (pixmap) |
603 | XFreePixmap (target->dpy, pixmap); |
602 | XFreePixmap (target->dpy, pixmap); |
604 | pixmap = XCreatePixmap (target->dpy, target->vt, new_pmap_width, new_pmap_height, target->depth); |
603 | pixmap = XCreatePixmap (target->dpy, target->vt, new_pmap_width, new_pmap_height, target->depth); |
605 | pmap_width = new_pmap_width; |
604 | pmap_width = new_pmap_width; |
606 | pmap_height = new_pmap_height; |
605 | pmap_height = new_pmap_height; |
607 | pmap_depth = target->depth; |
|
|
608 | } |
606 | } |
609 | /* fill with background color (if result's not completely overlapping it) */ |
607 | /* fill with background color (if result's not completely overlapping it) */ |
610 | gcv.foreground = target->pix_colors[Color_bg]; |
608 | gcv.foreground = target->pix_colors[Color_bg]; |
611 | gc = XCreateGC (target->dpy, target->vt, GCForeground, &gcv); |
609 | gc = XCreateGC (target->dpy, target->vt, GCForeground, &gcv); |
612 | |
610 | |
… | |
… | |
803 | } |
801 | } |
804 | } |
802 | } |
805 | |
803 | |
806 | if (pixmap == None |
804 | if (pixmap == None |
807 | || pmap_width != new_pmap_width |
805 | || pmap_width != new_pmap_width |
808 | || pmap_height != new_pmap_height |
806 | || pmap_height != new_pmap_height) |
809 | || pmap_depth != target->depth) |
|
|
810 | { |
807 | { |
811 | if (pixmap) |
808 | if (pixmap) |
812 | XFreePixmap (target->dpy, pixmap); |
809 | XFreePixmap (target->dpy, pixmap); |
813 | pixmap = XCreatePixmap (target->dpy, target->vt, new_pmap_width, new_pmap_height, target->depth); |
810 | pixmap = XCreatePixmap (target->dpy, target->vt, new_pmap_width, new_pmap_height, target->depth); |
814 | pmap_width = new_pmap_width; |
811 | pmap_width = new_pmap_width; |
815 | pmap_height = new_pmap_height; |
812 | pmap_height = new_pmap_height; |
816 | pmap_depth = target->depth; |
|
|
817 | } |
813 | } |
818 | |
814 | |
819 | gcv.foreground = target->pix_colors[Color_bg]; |
815 | gcv.foreground = target->pix_colors[Color_bg]; |
820 | gc = XCreateGC (target->dpy, target->vt, GCForeground, &gcv); |
816 | gc = XCreateGC (target->dpy, target->vt, GCForeground, &gcv); |
821 | |
817 | |
… | |
… | |
1372 | XFreePixmap (dpy, pixmap); |
1368 | XFreePixmap (dpy, pixmap); |
1373 | |
1369 | |
1374 | pixmap = tiled_root_pmap; |
1370 | pixmap = tiled_root_pmap; |
1375 | pmap_width = window_width; |
1371 | pmap_width = window_width; |
1376 | pmap_height = window_height; |
1372 | pmap_height = window_height; |
1377 | pmap_depth = target->depth; |
|
|
1378 | } |
1373 | } |
1379 | else |
1374 | else |
1380 | XFreePixmap (dpy, tiled_root_pmap); |
1375 | XFreePixmap (dpy, tiled_root_pmap); |
1381 | |
1376 | |
1382 | if (recoded_root_pmap != root_pixmap) |
1377 | if (recoded_root_pmap != root_pixmap) |