mirror of
https://github.com/gryf/wmaker.git
synced 2026-03-04 07:45:48 +01:00
- WMGetTextDefaultColor() won't retain the returned color anymore, and you
shouldn't release it. It is just a reference to the internal WMText color. This should make all the functions returning colors from widgets behave consistently
This commit is contained in:
@@ -47,6 +47,8 @@ Changes since wmaker 0.80.1:
|
|||||||
- Fixed a memory leak in wfontpanel.c
|
- Fixed a memory leak in wfontpanel.c
|
||||||
- Added a check that only %d is used in a font specification in WMGLOBAL and at
|
- Added a check that only %d is used in a font specification in WMGLOBAL and at
|
||||||
most once for each font in a fontset (eliminates a possible security exploit)
|
most once for each font in a fontset (eliminates a possible security exploit)
|
||||||
|
- Fixed WMGetTextDefaultColor() not to retain the returned color. It returns
|
||||||
|
only a reference to the internal color, which you shouldn't release
|
||||||
|
|
||||||
|
|
||||||
Changes since wmaker 0.80.0:
|
Changes since wmaker 0.80.0:
|
||||||
|
|||||||
@@ -1401,7 +1401,7 @@ WMGetColorPanelColor(WMColorPanel *panel)
|
|||||||
return WMGetColorWellColor(panel->colorWell);
|
return WMGetColorWellColor(panel->colorWell);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
WMSetColorPanelColor(WMColorPanel *panel, WMColor *color)
|
WMSetColorPanelColor(WMColorPanel *panel, WMColor *color)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1070,7 +1070,6 @@ WMSetWidgetBackgroundColor(WMWidget *w, WMColor *color)
|
|||||||
WMColor*
|
WMColor*
|
||||||
WMGetWidgetBackgroundColor(WMWidget *w)
|
WMGetWidgetBackgroundColor(WMWidget *w)
|
||||||
{
|
{
|
||||||
// should retain?
|
|
||||||
return W_VIEW(w)->backColor;
|
return W_VIEW(w)->backColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3948,7 +3948,7 @@ WMSetTextDefaultColor(WMText *tPtr, WMColor *color)
|
|||||||
WMColor*
|
WMColor*
|
||||||
WMGetTextDefaultColor(WMText *tPtr)
|
WMGetTextDefaultColor(WMText *tPtr)
|
||||||
{
|
{
|
||||||
return WMRetainColor(tPtr->dColor);
|
return tPtr->dColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user