mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-20 21:08:08 +01:00
Fixed big memory leak in color panel code (patch from Pascal).
This commit is contained in:
@@ -37,6 +37,7 @@ changes since wmaker 0.61.1:
|
||||
- new wsyserrorwithcode(int error, const char* fmt, ...), similar to
|
||||
wsyserror(), but printing the message for the specified error code.
|
||||
- added 3 new classes: WMData, WMHost and WMConnection
|
||||
- fixed a big memory leak in the color panel code (from Pascal Hofstee).
|
||||
|
||||
changes since wmaker 0.61.0:
|
||||
............................
|
||||
|
||||
@@ -218,7 +218,7 @@ DIST_COMMON = README ChangeLog Makefile.am Makefile.in TODO
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = gtar
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
SOURCES = $(libWINGs_a_SOURCES) $(libWUtil_a_SOURCES) $(wtest_SOURCES) $(wmquery_SOURCES) $(wmfile_SOURCES) $(fontl_SOURCES) $(testmywidget_SOURCES) $(testcolorpanel_SOURCES) $(connect_SOURCES)
|
||||
OBJECTS = $(libWINGs_a_OBJECTS) $(libWUtil_a_OBJECTS) $(wtest_OBJECTS) $(wmquery_OBJECTS) $(wmfile_OBJECTS) $(fontl_OBJECTS) $(testmywidget_OBJECTS) $(testcolorpanel_OBJECTS) $(connect_OBJECTS)
|
||||
@@ -227,7 +227,7 @@ all: all-redirect
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .lo .o .s
|
||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu WINGs/Makefile
|
||||
cd $(top_srcdir) && $(AUTOMAKE) --gnu --include-deps WINGs/Makefile
|
||||
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
cd $(top_builddir) \
|
||||
@@ -482,7 +482,7 @@ distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$/$$file $(distdir)/$$file; \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|
||||
@@ -108,7 +108,7 @@ DIST_COMMON = Makefile.am Makefile.in
|
||||
|
||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||
|
||||
TAR = gtar
|
||||
TAR = tar
|
||||
GZIP_ENV = --best
|
||||
all: all-redirect
|
||||
.SUFFIXES:
|
||||
@@ -150,7 +150,7 @@ distdir: $(DISTFILES)
|
||||
@for file in $(DISTFILES); do \
|
||||
d=$(srcdir); \
|
||||
if test -d $$d/$$file; then \
|
||||
cp -pr $$/$$file $(distdir)/$$file; \
|
||||
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||
|
||||
@@ -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,9 +2196,8 @@ 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) {
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user