diff options
author | dougb <dougb@FreeBSD.org> | 2008-12-31 18:46:05 +0800 |
---|---|---|
committer | dougb <dougb@FreeBSD.org> | 2008-12-31 18:46:05 +0800 |
commit | ae8b28d5d456cd55ce0c4124e0e0ce3e1edfa324 (patch) | |
tree | c4c1765edb0c46bebecb3f420715e7f68c8bb177 /x11-wm | |
parent | 9a6cc9e8b78635a09a5bbc6d0a5581a728d6b04b (diff) | |
download | freebsd-ports-gnome-ae8b28d5d456cd55ce0c4124e0e0ce3e1edfa324.tar.gz freebsd-ports-gnome-ae8b28d5d456cd55ce0c4124e0e0ce3e1edfa324.tar.zst freebsd-ports-gnome-ae8b28d5d456cd55ce0c4124e0e0ce3e1edfa324.zip |
Add a fix for the following bugs:
- 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>)
Inspired by the "refcount" patch in the Debian rpm, updated versions
of the patches obtained from the latest WindowMaker source repo.
Diffstat (limited to 'x11-wm')
-rw-r--r-- | x11-wm/windowmaker/files/patch-WINGs_wview.c | 23 | ||||
-rw-r--r-- | x11-wm/windowmaker/files/patch-src_switchpanel.c | 42 |
2 files changed, 65 insertions, 0 deletions
diff --git a/x11-wm/windowmaker/files/patch-WINGs_wview.c b/x11-wm/windowmaker/files/patch-WINGs_wview.c new file mode 100644 index 000000000000..d72267f3d55b --- /dev/null +++ b/x11-wm/windowmaker/files/patch-WINGs_wview.c @@ -0,0 +1,23 @@ +diff -urbB ../WindowMaker-0.92.0/WINGs/wview.c ./WINGs/wview.c +--- ../WindowMaker-0.92.0/WINGs/wview.c 2004-10-27 19:41:04.000000000 -0700 ++++ ./WINGs/wview.c 2008-12-14 19:59:05.000000000 -0800 +@@ -450,6 +450,9 @@ + + W_FreeViewXdndPart(view); + ++ if (view->backColor) ++ WMReleaseColor(view->backColor); ++ + wfree(view); + } + +@@ -715,7 +718,8 @@ + { + WMScreen *scr = W_VIEW_SCREEN(view); + Window foo; +- int x, y, topX, topY, bar; ++ int x, y, topX, topY; ++ unsigned int bar; + WMView *topView; + + topView = view; diff --git a/x11-wm/windowmaker/files/patch-src_switchpanel.c b/x11-wm/windowmaker/files/patch-src_switchpanel.c new file mode 100644 index 000000000000..9f3bdeed1ffd --- /dev/null +++ b/x11-wm/windowmaker/files/patch-src_switchpanel.c @@ -0,0 +1,42 @@ +diff -urbB ../WindowMaker-0.92.0/src/switchpanel.c ./src/switchpanel.c +--- ../WindowMaker-0.92.0/src/switchpanel.c 2004-10-30 00:16:04.000000000 -0700 ++++ ./src/switchpanel.c 2008-12-14 19:59:05.000000000 -0800 +@@ -464,7 +464,7 @@ + iconsThatFitCount= count; + + if (width > rect.size.width) { +- iconsThatFitCount = (WMScreenWidth(scr->wmscreen)-SCREEN_BORDER_SPACING)/ICON_TILE_SIZE; ++ iconsThatFitCount = (rect.size.width-SCREEN_BORDER_SPACING)/ICON_TILE_SIZE; + width= iconsThatFitCount*ICON_TILE_SIZE; + } + +@@ -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); + } + |