summaryrefslogtreecommitdiff
path: root/x11-wm
diff options
context:
space:
mode:
authorDoug Barton <dougb@FreeBSD.org>2008-12-31 10:46:05 +0000
committerDoug Barton <dougb@FreeBSD.org>2008-12-31 10:46:05 +0000
commit29c9d45f894054463846a0a82708e32e7779619e (patch)
treee0253ed4f97750f6c07c4067ff54b1447e599167 /x11-wm
parentFix issues with fullscreen mode, particularly for OpenOffice. (diff)
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.
Notes
Notes: svn path=/head/; revision=225050
Diffstat (limited to 'x11-wm')
-rw-r--r--x11-wm/windowmaker/files/patch-WINGs_wview.c23
-rw-r--r--x11-wm/windowmaker/files/patch-src_switchpanel.c42
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);
+ }
+