Revert "Area: do not destroy pixmap when not necessary"
This reverts commit f2922d7dbd
.
This commit is contained in:
parent
57c35549f3
commit
070eb7ba4d
1 changed files with 3 additions and 14 deletions
|
@ -419,23 +419,12 @@ void show(Area *a)
|
||||||
|
|
||||||
void draw (Area *a)
|
void draw (Area *a)
|
||||||
{
|
{
|
||||||
if (a->pix) {
|
if (a->pix) XFreePixmap (server.dsp, a->pix);
|
||||||
unsigned int d1, width, height;
|
|
||||||
Window d2;
|
|
||||||
int d3;
|
|
||||||
XGetGeometry(server.dsp, server.root_win, &d2, &d3, &d3, &width, &height, &d1, &d1);
|
|
||||||
if (width != a->width || height != a->height) {
|
|
||||||
XFreePixmap (server.dsp, a->pix);
|
|
||||||
a->pix = XCreatePixmap (server.dsp, server.root_win, a->width, a->height, server.depth);
|
a->pix = XCreatePixmap (server.dsp, server.root_win, a->width, a->height, server.depth);
|
||||||
}
|
|
||||||
} else {
|
|
||||||
a->pix = XCreatePixmap(server.dsp, server.root_win, a->width, a->height, server.depth);
|
|
||||||
}
|
|
||||||
|
|
||||||
// add layer of root pixmap (or clear pixmap if real_transparency==true)
|
// add layer of root pixmap (or clear pixmap if real_transparency==true)
|
||||||
if (server.real_transparency)
|
if (server.real_transparency)
|
||||||
clear_pixmap(a->pix, 0 ,0, a->width, a->height);
|
clear_pixmap(a->pix, 0 ,0, a->width, a->height);
|
||||||
else
|
|
||||||
XCopyArea (server.dsp, ((Panel *)a->panel)->temp_pmap, a->pix, server.gc, a->posx, a->posy, a->width, a->height, 0, 0);
|
XCopyArea (server.dsp, ((Panel *)a->panel)->temp_pmap, a->pix, server.gc, a->posx, a->posy, a->width, a->height, 0, 0);
|
||||||
|
|
||||||
cairo_surface_t *cs;
|
cairo_surface_t *cs;
|
||||||
|
|
Loading…
Reference in a new issue