1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-21 05:18:06 +01:00

- 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 <martin.frydl@systinet.com>)
- fixed a small memory leak in WINGs/wview.c caused by not releasing the
  background color of a view (Martin Frydl <martin.frydl@systinet.com>)
This commit is contained in:
dan
2006-01-22 18:19:09 +00:00
parent fa7a5db4bd
commit bacf8229b0
3 changed files with 13 additions and 1 deletions

View File

@@ -15,6 +15,11 @@ Changes since version 0.92.0:
on 64bit platforms (Max Loparyev <max@city.veganet.ru>)
- fixed issue with icon colors on big endian platforms
(Max Loparyev <max@city.veganet.ru>)
- 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 <martin.frydl@systinet.com>)
- fixed a small memory leak in WINGs/wview.c caused by not releasing the
background color of a view (Martin Frydl <martin.frydl@systinet.com>)
Changes since version 0.91.0:

View File

@@ -450,6 +450,9 @@ destroyView(W_View *view)
W_FreeViewXdndPart(view);
if (view->backColor)
WMReleaseColor(view->backColor);
wfree(view);
}

View File

@@ -501,6 +501,7 @@ WSwitchPanel *wInitSwitchPanel(WScreen *scr, WWindow *curwin, int workspace)
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 @@ WSwitchPanel *wInitSwitchPanel(WScreen *scr, WWindow *curwin, int workspace)
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 @@ void wSwitchPanelDestroy(WSwitchPanel *panel)
RReleaseImage(panel->bg);
if (panel->font)
WMReleaseFont(panel->font);
if (panel->white)
WMReleaseColor(panel->white);
wfree(panel);
}