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
|
- new wsyserrorwithcode(int error, const char* fmt, ...), similar to
|
||||||
wsyserror(), but printing the message for the specified error code.
|
wsyserror(), but printing the message for the specified error code.
|
||||||
- added 3 new classes: WMData, WMHost and WMConnection
|
- 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:
|
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)
|
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
|
||||||
TAR = gtar
|
TAR = tar
|
||||||
GZIP_ENV = --best
|
GZIP_ENV = --best
|
||||||
SOURCES = $(libWINGs_a_SOURCES) $(libWUtil_a_SOURCES) $(wtest_SOURCES) $(wmquery_SOURCES) $(wmfile_SOURCES) $(fontl_SOURCES) $(testmywidget_SOURCES) $(testcolorpanel_SOURCES) $(connect_SOURCES)
|
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)
|
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:
|
||||||
.SUFFIXES: .S .c .lo .o .s
|
.SUFFIXES: .S .c .lo .o .s
|
||||||
$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
|
$(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
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
cd $(top_builddir) \
|
cd $(top_builddir) \
|
||||||
@@ -482,7 +482,7 @@ distdir: $(DISTFILES)
|
|||||||
@for file in $(DISTFILES); do \
|
@for file in $(DISTFILES); do \
|
||||||
d=$(srcdir); \
|
d=$(srcdir); \
|
||||||
if test -d $$d/$$file; then \
|
if test -d $$d/$$file; then \
|
||||||
cp -pr $$/$$file $(distdir)/$$file; \
|
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||||
else \
|
else \
|
||||||
test -f $(distdir)/$$file \
|
test -f $(distdir)/$$file \
|
||||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
|| 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)
|
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
|
||||||
TAR = gtar
|
TAR = tar
|
||||||
GZIP_ENV = --best
|
GZIP_ENV = --best
|
||||||
all: all-redirect
|
all: all-redirect
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
@@ -150,7 +150,7 @@ distdir: $(DISTFILES)
|
|||||||
@for file in $(DISTFILES); do \
|
@for file in $(DISTFILES); do \
|
||||||
d=$(srcdir); \
|
d=$(srcdir); \
|
||||||
if test -d $$d/$$file; then \
|
if test -d $$d/$$file; then \
|
||||||
cp -pr $$/$$file $(distdir)/$$file; \
|
cp -pr $$d/$$file $(distdir)/$$file; \
|
||||||
else \
|
else \
|
||||||
test -f $(distdir)/$$file \
|
test -f $(distdir)/$$file \
|
||||||
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
|| ln $$d/$$file $(distdir)/$$file 2> /dev/null \
|
||||||
|
|||||||
@@ -18,8 +18,8 @@
|
|||||||
/* TODO:
|
/* TODO:
|
||||||
* - Look at further optimization of colorWheel matrix calculation.
|
* - Look at further optimization of colorWheel matrix calculation.
|
||||||
* It appears to be rather symmetric in angles of 60 degrees,
|
* It appears to be rather symmetric in angles of 60 degrees,
|
||||||
* while it is optimized in angles of 120 degrees.
|
* while it is optimized in angles of 90 degrees.
|
||||||
* - Custom color-lists and custom colors in custom colo-lists.
|
* - Custom color-lists and custom colors in custom color-lists.
|
||||||
* - Stored colors
|
* - Stored colors
|
||||||
* - Resizing
|
* - Resizing
|
||||||
*/
|
*/
|
||||||
@@ -2196,9 +2196,8 @@ wheelRender(W_ColorPanel *panel)
|
|||||||
if (panel->wheelImg)
|
if (panel->wheelImg)
|
||||||
XFreePixmap(scr->display, 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);
|
RConvertImage(scr->rcontext, image, &panel->wheelImg);
|
||||||
|
RDestroyImage(image);
|
||||||
|
|
||||||
/* Check if backimage exists. If it doesn't, allocate and fill it */
|
/* Check if backimage exists. If it doesn't, allocate and fill it */
|
||||||
if (!panel->selectionBackImg) {
|
if (!panel->selectionBackImg) {
|
||||||
@@ -2208,8 +2207,6 @@ wheelRender(W_ColorPanel *panel)
|
|||||||
scr->copyGC, panel->colx -2, panel->coly -2, 4, 4, 0, 0);
|
scr->copyGC, panel->colx -2, panel->coly -2, 4, 4, 0, 0);
|
||||||
/* -2 is hot spot correction */
|
/* -2 is hot spot correction */
|
||||||
}
|
}
|
||||||
|
|
||||||
RDestroyImage(image);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user