1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-06 22:04:12 +01:00

Fixed big memory leak in color panel code (patch from Pascal).

This commit is contained in:
dan
2000-01-07 22:08:35 +00:00
parent d98f1fa645
commit 503c1e8864
4 changed files with 10 additions and 12 deletions

View File

@@ -18,8 +18,8 @@
/* TODO:
* - Look at further optimization of colorWheel matrix calculation.
* It appears to be rather symmetric in angles of 60 degrees,
* while it is optimized in angles of 120 degrees.
* - Custom color-lists and custom colors in custom colo-lists.
* while it is optimized in angles of 90 degrees.
* - Custom color-lists and custom colors in custom color-lists.
* - Stored colors
* - Resizing
*/
@@ -2196,10 +2196,9 @@ wheelRender(W_ColorPanel *panel)
if (panel->wheelImg)
XFreePixmap(scr->display, panel->wheelImg);
panel->wheelImg = XCreatePixmap(scr->display, W_DRAWABLE(scr),
colorWheelSize+4, colorWheelSize+4, scr->depth);
RConvertImage(scr->rcontext, image, &panel->wheelImg);
RDestroyImage(image);
/* Check if backimage exists. If it doesn't, allocate and fill it */
if (!panel->selectionBackImg) {
panel->selectionBackImg = XCreatePixmap(scr->display,
@@ -2208,8 +2207,6 @@ wheelRender(W_ColorPanel *panel)
scr->copyGC, panel->colx -2, panel->coly -2, 4, 4, 0, 0);
/* -2 is hot spot correction */
}
RDestroyImage(image);
}