# HG changeset patch
# User Dan Pascu <[EMAIL PROTECTED]>
# Date 1137953949 28800
# Branch wm_0_92
# Node ID 31713fe06c6ed35257b02d6dbc7d8d7fc5689488
# Parent 546cdc087ef594a3a978c8e71949bcadde044c42
- release colors to avoid issues with the reference count overflowing a
small integer and causing unexpected color releases that can crash
Window Maker (Martin Frydl <[EMAIL PROTECTED]>)
- fixed a small memory leak in WINGs/wview.c caused by not releasing the
background color of a view (Martin Frydl <[EMAIL PROTECTED]>)
(transplanted from b75b79a2b039797b85119f036a622db9e2c6bf1e)
diff -r 546cdc087ef5 -r 31713fe06c6e ChangeLog
--- a/ChangeLog Sun Jan 22 10:05:00 2006 -0800
+++ b/ChangeLog Sun Jan 22 10:19:09 2006 -0800
@@ -15,6 +15,11 @@
on 64bit platforms (Max Loparyev <[EMAIL PROTECTED]>)
- fixed issue with icon colors on big endian platforms
(Max Loparyev <[EMAIL PROTECTED]>)
+- release colors to avoid issues with the reference count overflowing a
+ small integer and causing unexpected color releases that can crash
+ Window Maker (Martin Frydl <[EMAIL PROTECTED]>)
+- fixed a small memory leak in WINGs/wview.c caused by not releasing the
+ background color of a view (Martin Frydl <[EMAIL PROTECTED]>)
Changes since version 0.91.0:
diff -r 546cdc087ef5 -r 31713fe06c6e WINGs/wview.c
--- a/WINGs/wview.c Sun Jan 22 10:05:00 2006 -0800
+++ b/WINGs/wview.c Sun Jan 22 10:19:09 2006 -0800
@@ -450,6 +450,9 @@
W_FreeViewXdndPart(view);
+ if (view->backColor)
+ WMReleaseColor(view->backColor);
+
wfree(view);
}
diff -r 546cdc087ef5 -r 31713fe06c6e src/switchpanel.c
--- a/src/switchpanel.c Sun Jan 22 10:05:00 2006 -0800
+++ b/src/switchpanel.c Sun Jan 22 10:19:09 2006 -0800
@@ -501,6 +501,7 @@
if (!panel->bg) {
WMFrame *frame = WMCreateFrame(panel->win);
+ WMColor *darkGray = WMDarkGrayColor(scr->wmscreen);
WMSetFrameRelief(frame, WRSimple);
WMSetViewExpandsToParent(WMWidgetView(frame), 0, 0, 0, 0);
@@ -508,10 +509,11 @@
WMResizeWidget(panel->label, width, LABEL_HEIGHT);
WMMoveWidget(panel->label, BORDER_SPACE,
BORDER_SPACE+ICON_TILE_SIZE+5);
WMSetLabelRelief(panel->label, WRSimple);
- WMSetWidgetBackgroundColor(panel->label,
WMDarkGrayColor(scr->wmscreen));
+ WMSetWidgetBackgroundColor(panel->label, darkGray);
WMSetLabelFont(panel->label, panel->font);
WMSetLabelTextColor(panel->label, panel->white);
+ WMReleaseColor(darkGray);
height+= 5;
}
@@ -604,6 +606,8 @@
RReleaseImage(panel->bg);
if (panel->font)
WMReleaseFont(panel->font);
+ if (panel->white)
+ WMReleaseColor(panel->white);
wfree(panel);
}
--
To unsubscribe, send mail to [EMAIL PROTECTED]