aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Messenger <mezz@FreeBSD.org>2008-09-17 04:23:32 +0000
committerJeremy Messenger <mezz@FreeBSD.org>2008-09-17 04:23:32 +0000
commit6fc7f3bdc0ecd59c26da3fb0269e2e7d8ed64112 (patch)
tree49f01ade4c12382afe3a28232190ac27f195abab
parent47f5087334cbb39916d2a8db58ad1d5497dcdb17 (diff)
downloadports-6fc7f3bdc0ecd59c26da3fb0269e2e7d8ed64112.tar.gz
ports-6fc7f3bdc0ecd59c26da3fb0269e2e7d8ed64112.zip
-Fix unshading crash. [1]
-Fix pixmap resource leak in pixmap menu. -Bump the PORTREVISION. Reported by: L Campbell <llc2w@virginia.edu> [1] Tested by: L Campbell <llc2w@virginia.edu> [1] Randy Pratt <bsd-unix@embarqmail.com> [1] Obtained from: Its git repository (both patches) Approved by: portmgr (linimon)
Notes
Notes: svn path=/head/; revision=220414
-rw-r--r--x11-wm/fluxbox/Makefile1
-rw-r--r--x11-wm/fluxbox/files/patch-fix_pixmap_resource_leak102
-rw-r--r--x11-wm/fluxbox/files/patch-fix_unshading_crash25
3 files changed, 128 insertions, 0 deletions
diff --git a/x11-wm/fluxbox/Makefile b/x11-wm/fluxbox/Makefile
index cb6e5c6f3402..80a3ef57eb74 100644
--- a/x11-wm/fluxbox/Makefile
+++ b/x11-wm/fluxbox/Makefile
@@ -7,6 +7,7 @@
PORTNAME= fluxbox
PORTVERSION= 1.1.0.1
+PORTREVISION= 1
CATEGORIES= x11-wm
MASTER_SITES= SF
DISTFILES= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}
diff --git a/x11-wm/fluxbox/files/patch-fix_pixmap_resource_leak b/x11-wm/fluxbox/files/patch-fix_pixmap_resource_leak
new file mode 100644
index 000000000000..9ccef938b86e
--- /dev/null
+++ b/x11-wm/fluxbox/files/patch-fix_pixmap_resource_leak
@@ -0,0 +1,102 @@
+From 91408776f0b04dbc5a5da99f555b33f9abc5a905 Mon Sep 17 00:00:00 2001
+From: Henrik Kinnunen <fluxgen@fluxbox.org>
+Date: Sun, 14 Sep 2008 21:36:16 +0200
+Subject: [PATCH] Fixed a pixmap resource leak with selected pixmap in menus.
+
+menu.hilite.selected.pixmap and menu.selected.pixmap was not
+deleted while switching between non-pixmap styles and pixmap styles.
+---
+ ChangeLog | 3 +++
+ src/FbTk/ImageControl.cc | 9 ++++++++-
+ src/FbTk/ImageControl.hh | 5 ++++-
+ src/FbTk/Menu.cc | 18 +++++++++++++++---
+ 4 files changed, 30 insertions(+), 5 deletions(-)
+
+diff --git a/ChangeLog b/ChangeLog
+--- a/ChangeLog
++++ ChangeLog
+@@ -1,5 +1,8 @@
+ (Format: Year/Month/Day)
+ Changes for 1.1
++*08/09/14:
++ * Fixed a minor pixmap resource leak (Henrik)
++ FbTk/Menu.cc, FbTk/ImageControl.cc/hh
+ *08/09/01:
+ * When the current menu item gets disabled, highlight its nearest neighbor
+ and add separators to the focus model menu (Mark)
+diff --git a/src/FbTk/ImageControl.cc b/src/FbTk/ImageControl.cc
+--- a/src/FbTk/ImageControl.cc
++++ src/FbTk/ImageControl.cc
+@@ -227,11 +227,18 @@ Pixmap ImageControl::searchCache(unsigned int width, unsigned int height,
+
+ Pixmap ImageControl::renderImage(unsigned int width, unsigned int height,
+ const FbTk::Texture &texture,
+- FbTk::Orientation orient) {
++ FbTk::Orientation orient,
++ bool use_cache ) {
+
+ if (texture.type() & FbTk::Texture::PARENTRELATIVE)
+ return ParentRelative;
+
++ // If we are not suppose to cache this pixmap, just render and return it
++ if ( ! use_cache) {
++ TextureRender image(*this, width, height, orient, m_colors, m_num_colors);
++ return image.render(texture);
++ }
++
+ // search cache first
+ Pixmap pixmap = searchCache(width, height, texture, orient);
+ if (pixmap) {
+diff --git a/src/FbTk/ImageControl.hh b/src/FbTk/ImageControl.hh
+--- a/src/FbTk/ImageControl.hh
++++ src/FbTk/ImageControl.hh
+@@ -54,11 +54,14 @@ public:
+ @param width width of pixmap
+ @param height height of pixmap
+ @param src_texture texture type to render
++ @param orient Orientation of the texture.
++ @param use_cache whether or not to use cache
+ @return pixmap of the rendered image, on failure None
+ */
+ Pixmap renderImage(unsigned int width, unsigned int height,
+ const FbTk::Texture &src_texture,
+- Orientation orient = ROT0);
++ Orientation orient = ROT0,
++ bool use_cache = true);
+
+ void installRootColormap();
+ void removeImage(Pixmap thepix);
+diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc
+--- a/src/FbTk/Menu.cc
++++ src/FbTk/Menu.cc
+@@ -460,12 +460,24 @@ void Menu::updateMenu(int active_index) {
+
+ if (!theme()->selectedPixmap().pixmap().drawable()) {
+ int hw = theme()->itemHeight() / 2;
+- theme()->setSelectedPixmap(m_image_ctrl.renderImage(hw, hw, theme()->hiliteTexture()), true);
++ // render image, disable cache and let the theme remove the pixmap
++ theme()->setSelectedPixmap(m_image_ctrl.
++ renderImage(hw, hw,
++ theme()->hiliteTexture(), ROT0,
++ false // no cache
++ ),
++ false); // the theme takes care of this pixmap
+
+ if (!theme()->highlightSelectedPixmap().pixmap().drawable()) {
+ int hw = theme()->itemHeight() / 2;
+- theme()->setHighlightSelectedPixmap(m_image_ctrl.renderImage(hw, hw, theme()->frameTexture()), true);
+- }
++ // render image, disable cache and let the theme remove the pixmap
++ theme()->setHighlightSelectedPixmap(m_image_ctrl.
++ renderImage(hw, hw,
++ theme()->frameTexture(), ROT0,
++ false // no cache
++ ),
++ false); // theme takes care of this pixmap
++ }
+ }
+
+ if (m_title_vis) {
+--
+1.6.0.1
+
diff --git a/x11-wm/fluxbox/files/patch-fix_unshading_crash b/x11-wm/fluxbox/files/patch-fix_unshading_crash
new file mode 100644
index 000000000000..3a4d5ee442c3
--- /dev/null
+++ b/x11-wm/fluxbox/files/patch-fix_unshading_crash
@@ -0,0 +1,25 @@
+From bf620f96df0942db356255f8af7f522ae46af82e Mon Sep 17 00:00:00 2001
+From: Mark Tiefenbruck <mark@fluxbox.org>
+Date: Thu, 11 Sep 2008 13:01:11 -0700
+Subject: [PATCH] fix program crashes caused by unshading
+
+---
+ src/FbWinFrame.cc | 3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc
+--- a/src/FbWinFrame.cc
++++ src/FbWinFrame.cc
+@@ -1489,7 +1489,8 @@ void FbWinFrame::applyDecorations(bool do_move) {
+ client_move = true;
+ }
+
+- reconfigure();
++ if (do_move)
++ reconfigure();
+ if (client_move)
+ frameExtentSig().notify();
+ }
+--
+1.6.0.1
+