mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-21 13:28:05 +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:
@@ -15,6 +15,11 @@ Changes since version 0.92.0:
|
|||||||
on 64bit platforms (Max Loparyev <max@city.veganet.ru>)
|
on 64bit platforms (Max Loparyev <max@city.veganet.ru>)
|
||||||
- fixed issue with icon colors on big endian platforms
|
- fixed issue with icon colors on big endian platforms
|
||||||
(Max Loparyev <max@city.veganet.ru>)
|
(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:
|
Changes since version 0.91.0:
|
||||||
|
|||||||
@@ -450,6 +450,9 @@ destroyView(W_View *view)
|
|||||||
|
|
||||||
W_FreeViewXdndPart(view);
|
W_FreeViewXdndPart(view);
|
||||||
|
|
||||||
|
if (view->backColor)
|
||||||
|
WMReleaseColor(view->backColor);
|
||||||
|
|
||||||
wfree(view);
|
wfree(view);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -501,6 +501,7 @@ WSwitchPanel *wInitSwitchPanel(WScreen *scr, WWindow *curwin, int workspace)
|
|||||||
|
|
||||||
if (!panel->bg) {
|
if (!panel->bg) {
|
||||||
WMFrame *frame = WMCreateFrame(panel->win);
|
WMFrame *frame = WMCreateFrame(panel->win);
|
||||||
|
WMColor *darkGray = WMDarkGrayColor(scr->wmscreen);
|
||||||
WMSetFrameRelief(frame, WRSimple);
|
WMSetFrameRelief(frame, WRSimple);
|
||||||
WMSetViewExpandsToParent(WMWidgetView(frame), 0, 0, 0, 0);
|
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);
|
WMResizeWidget(panel->label, width, LABEL_HEIGHT);
|
||||||
WMMoveWidget(panel->label, BORDER_SPACE, BORDER_SPACE+ICON_TILE_SIZE+5);
|
WMMoveWidget(panel->label, BORDER_SPACE, BORDER_SPACE+ICON_TILE_SIZE+5);
|
||||||
WMSetLabelRelief(panel->label, WRSimple);
|
WMSetLabelRelief(panel->label, WRSimple);
|
||||||
WMSetWidgetBackgroundColor(panel->label, WMDarkGrayColor(scr->wmscreen));
|
WMSetWidgetBackgroundColor(panel->label, darkGray);
|
||||||
WMSetLabelFont(panel->label, panel->font);
|
WMSetLabelFont(panel->label, panel->font);
|
||||||
WMSetLabelTextColor(panel->label, panel->white);
|
WMSetLabelTextColor(panel->label, panel->white);
|
||||||
|
|
||||||
|
WMReleaseColor(darkGray);
|
||||||
height+= 5;
|
height+= 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -604,6 +606,8 @@ void wSwitchPanelDestroy(WSwitchPanel *panel)
|
|||||||
RReleaseImage(panel->bg);
|
RReleaseImage(panel->bg);
|
||||||
if (panel->font)
|
if (panel->font)
|
||||||
WMReleaseFont(panel->font);
|
WMReleaseFont(panel->font);
|
||||||
|
if (panel->white)
|
||||||
|
WMReleaseColor(panel->white);
|
||||||
wfree(panel);
|
wfree(panel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user