View | Details | Raw Unified | Return to bug 136136
Collapse All | Expand All

(-)/usr/ports/x11-wm/fluxbox/Makefile (-2 / +1 lines)
Lines 6-13 Link Here
6
#
6
#
7
7
8
PORTNAME=	fluxbox
8
PORTNAME=	fluxbox
9
PORTVERSION=	1.1.0.1
9
PORTVERSION=	1.1.1
10
PORTREVISION=	5
11
CATEGORIES=	x11-wm
10
CATEGORIES=	x11-wm
12
MASTER_SITES=	SF
11
MASTER_SITES=	SF
13
DISTFILES=	${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}
12
DISTFILES=	${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX}
(-)/usr/ports/x11-wm/fluxbox/distinfo (-9 / +3 lines)
Lines 1-9 Link Here
1
MD5 (fluxbox-1.1.0.1.tar.gz) = 6f5aa590058a39bc1cfdbe38b092e2b3
1
MD5 (fluxbox-1.1.1.tar.gz) = e0be927617be4ffc1ddc79513f4eb0f9
2
SHA256 (fluxbox-1.1.0.1.tar.gz) = ff292dee6f36ef690df3989480481f679f95daee98a85d5dcdbf0a6fa4223ea4
2
SHA256 (fluxbox-1.1.1.tar.gz) = 7306ee55a8e95a4d07bee339ffb3be2d88ef8cc08b86edd6c63d7b28f559ec88
3
SIZE (fluxbox-1.1.0.1.tar.gz) = 1013472
3
SIZE (fluxbox-1.1.1.tar.gz) = 1012997
4
MD5 (fb-doc-mfhtml-20060629.tgz) = 0c100fe1489c22f5b205d87b9a6fa006
5
SHA256 (fb-doc-mfhtml-20060629.tgz) = 98d37b73dbb1caf1361b098bffc69d1f365f9b324a71f622ba72ed5da5d9b9ec
6
SIZE (fb-doc-mfhtml-20060629.tgz) = 115560
7
MD5 (fluxbook-20060629.pdf) = 83d96b1c8a9276238300cf732f137182
8
SHA256 (fluxbook-20060629.pdf) = 8f225b101e9ab81543182c83699aeef3fe86370d72da215831321c903eee9cde
9
SIZE (fluxbook-20060629.pdf) = 430351
(-)/usr/ports/x11-wm/fluxbox/files/patch-aaa00 (-10 lines)
Lines 1-10 Link Here
1
--- src/fluxbox.cc.orig
2
+++ src/fluxbox.cc
3
@@ -825,6 +825,7 @@ void Fluxbox::handleEvent(XEvent * const e) {
4
         // a grab is something of a pseudo-focus event, so we ignore
5
         // them, here we ignore some window receiving it
6
         if (e->xfocus.mode == NotifyGrab ||
7
+            e->xfocus.mode == NotifyUngrab ||
8
             e->xfocus.detail == NotifyPointer ||
9
             e->xfocus.detail == NotifyInferior)
10
             break;
(-)/usr/ports/x11-wm/fluxbox/files/patch-aaa01 (-160 lines)
Lines 1-160 Link Here
1
From: Henrik Kinnunen <fluxgen@fluxbox.org>
2
Date: Sun, 14 Sep 2008 18:06:28 +0000 (+0200)
3
Subject: some minor code cleaning.
4
X-Git-Tag: Release-1_1_1~4
5
X-Git-Url: http://git.fluxbox.org/?p=fluxbox.git;a=commitdiff_plain;h=9f519ec0fcb7cd0dec61a4c31d246800f9a73cb3
6
7
some minor code cleaning.
8
---
9
10
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc
11
index 5b91218..fc35ae1 100644
12
--- a/src/FbWinFrame.cc
13
+++ src/FbWinFrame.cc
14
@@ -1717,3 +1717,10 @@ void FbWinFrame::displaySize(unsigned int width, unsigned int height) const {
15
                             width, height - titlebarHeight() - handleHeight());
16
     m_screen.showGeometry(i, j);
17
 }
18
+
19
+bool FbWinFrame::insideTitlebar(Window win) const {
20
+    return 
21
+        gripLeft().window() != win &&
22
+        gripRight().window() != win &&
23
+        window().window() != win;
24
+}
25
diff --git a/src/FbWinFrame.hh b/src/FbWinFrame.hh
26
index fcbe11e..ff9c19e 100644
27
--- a/src/FbWinFrame.hh
28
+++ src/FbWinFrame.hh
29
@@ -236,6 +236,9 @@ public:
30
 
31
     const FbTk::Subject &frameExtentSig() const { return m_frame_extent_sig; }
32
     FbTk::Subject &frameExtentSig() { return m_frame_extent_sig; }
33
+    /// @returns true if the window is inside titlebar, 
34
+    /// assuming window is an event window that was generated for this frame.
35
+    bool insideTitlebar(Window win) const;
36
 
37
     //@}
38
 
39
diff --git a/src/RectangleUtil.hh b/src/RectangleUtil.hh
40
new file mode 100644
41
index 0000000..88c3a33
42
--- /dev/null
43
+++ src/RectangleUtil.hh
44
@@ -0,0 +1,30 @@
45
+#ifndef RECTANGLEUTIL_HH
46
+#define RECTANGLEUTIL_HH
47
+
48
+namespace RectangleUtil {
49
+
50
+
51
+/*
52
+ * Determines if a point is inside a rectangle-like objects border.
53
+ * @param rect A rectangle-like object that has accessors for x, y, width, and
54
+ *        height.
55
+ * @param x
56
+ * @param y 
57
+ * @param border_width The size of the border.
58
+ * @returns true if point is inside the rectangle-like object.
59
+*/
60
+template <typename RectangleLike>
61
+bool insideBorder(const RectangleLike& rect,
62
+                  int x, int y,
63
+                  int border_width) {
64
+    return
65
+        x >= rect.x() + border_width &&
66
+        x < rect.x() + (int)rect.width() + border_width &&
67
+        y >= rect.y() + border_width &&
68
+        y < rect.y() + (int)rect.height() + border_width;
69
+}
70
+
71
+} // namespace RectangleUtil
72
+
73
+
74
+#endif // RECTANGLEUTIL_HH
75
diff --git a/src/Window.cc b/src/Window.cc
76
index 16334c6..5d50fcf 100644
77
--- a/src/Window.cc
78
+++ src/Window.cc
79
@@ -41,6 +41,7 @@
80
 #include "FocusControl.hh"
81
 #include "IconButton.hh"
82
 #include "ScreenPlacement.hh"
83
+#include "RectangleUtil.hh"
84
 
85
 #include "FbTk/StringUtil.hh"
86
 #include "FbTk/Compose.hh"
87
@@ -2362,10 +2363,9 @@ void FluxboxWindow::buttonPressEvent(XButtonEvent &be) {
88
     m_last_button_x = be.x_root;
89
     m_last_button_y = be.y_root;
90
 
91
-    bool onTitlebar = frame().gripLeft().window() != be.window &&
92
-        frame().gripRight().window() != be.window &&
93
-        frame().handle().window() != be.window &&
94
-        frame().window() != be.window;
95
+    bool onTitlebar =
96
+        frame().insideTitlebar( be.window ) &&
97
+        frame().handle().window() != be.window;
98
 
99
     if (onTitlebar && be.button == 1)
100
         raise();
101
@@ -2422,41 +2422,31 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me) {
102
         me.window = frame().window().window();
103
     }
104
 
105
-    bool inside_titlebar = frame().gripLeft().window() != me.window &&
106
-        frame().gripRight().window() != me.window &&
107
-        frame().window() != me.window;
108
+    bool inside_titlebar = frame().insideTitlebar( me.window );
109
 
110
     if (Fluxbox::instance()->getIgnoreBorder() && m_attaching_tab == 0
111
         && !(isMoving() || isResizing())) {
112
+
113
+        using RectangleUtil::insideBorder;
114
+
115
         int borderw = frame().window().borderWidth();
116
         //!! TODO(tabs): the below test ought to be in FbWinFrame
117
         // if mouse is currently on the window border, ignore it
118
-        if ((me.x_root < (frame().x() + borderw) ||
119
-            me.y_root < (frame().y() + borderw) ||
120
-            me.x_root >= (frame().x() + (int)frame().width() + borderw) ||
121
-            me.y_root >= (frame().y() + (int)frame().height() + borderw))
122
-            && (!frame().externalTabMode() ||
123
-                (me.x_root < (frame().tabcontainer().x() + borderw) ||
124
-                 me.y_root < (frame().tabcontainer().y() + borderw) ||
125
-                 me.x_root >= (frame().tabcontainer().x() +
126
-                         (int)frame().tabcontainer().width() + borderw) ||
127
-                 me.y_root >= (frame().tabcontainer().y() +
128
-                         (int)frame().tabcontainer().height() + borderw)))
129
-            // or if mouse was on border when it was last clicked
130
-            || (m_last_button_x < (frame().x() + borderw) ||
131
-                m_last_button_y < (frame().y() + borderw) ||
132
-                m_last_button_x >= (frame().x() +
133
-                         (int)frame().width() + borderw) ||
134
-                m_last_button_y >= (frame().y() +
135
-                         (int)frame().height() + borderw))
136
-            && (!frame().externalTabMode() ||
137
-                (m_last_button_x < (frame().tabcontainer().x() + borderw) ||
138
-                 m_last_button_y < (frame().tabcontainer().y() + borderw) ||
139
-                 m_last_button_x >= (frame().tabcontainer().x() +
140
-                         (int)frame().tabcontainer().width() + borderw) ||
141
-                 m_last_button_y >= (frame().tabcontainer().y() +
142
-                         (int)frame().tabcontainer().height() + borderw))))
143
+        if ( ! insideBorder(frame(),
144
+                            me.x_root, me.y_root, borderw)  &&
145
+             ( !frame().externalTabMode() ||
146
+               ! insideBorder(frame().tabcontainer(),
147
+                              me.x_root, me.y_root, borderw) )
148
+
149
+             || // or if mouse was on border when it was last clicked
150
+
151
+             ! insideBorder(frame(),
152
+                            m_last_button_x, m_last_button_y, borderw) &&
153
+             ( ! frame().externalTabMode() ||
154
+               ! insideBorder(frame().tabcontainer(),
155
+                              m_last_button_x, m_last_button_y, borderw ) ) ) {
156
             return;
157
+        }
158
     }
159
 
160
     if (moving || ((me.state & Button1Mask) && functions.move &&
(-)/usr/ports/x11-wm/fluxbox/files/patch-aaa03 (-54 lines)
Lines 1-54 Link Here
1
From: Henrik Kinnunen <fluxgen@fluxbox.org>
2
Date: Sun, 14 Sep 2008 19:46:36 +0000 (+0200)
3
Subject: added RectangleUtil.hh to build
4
X-Git-Tag: Release-1_1_1~2
5
X-Git-Url: http://git.fluxbox.org/?p=fluxbox.git;a=commitdiff_plain;h=a4feddcbd63a4eca37ea3c1641daee25ed9a4c28
6
7
added RectangleUtil.hh to build
8
---
9
10
diff --git a/src/Makefile.am b/src/Makefile.am
11
index ce591d5..cfc06b3 100644
12
--- a/src/Makefile.am
13
+++ src/Makefile.am
14
@@ -151,6 +151,7 @@ fluxbox_SOURCES = AtomHandler.hh ArrowButton.hh ArrowButton.cc \
15
 	IconbarTheme.hh IconbarTheme.cc \
16
 	Focusable.hh FocusableList.hh FocusableList.cc FocusableTheme.hh \
17
 	WindowMenuAccessor.hh \
18
+	RectangleUtil.hh \
19
 	${newwmspec_SOURCE} ${gnome_SOURCE} \
20
 	${REMEMBER_SOURCE} ${TOOLBAR_SOURCE}
21
 
22
--- src/Makefile.in	2008-09-03 22:44:02.000000000 +0400
23
+++ src/Makefile.in	2008-11-20 03:54:38.000000000 +0300
24
@@ -98,10 +98,10 @@
25
 	AttentionNoticeHandler.cc IconButton.hh IconButton.cc \
26
 	IconbarTheme.hh IconbarTheme.cc Focusable.hh FocusableList.hh \
27
 	FocusableList.cc FocusableTheme.hh WindowMenuAccessor.hh \
28
-	Ewmh.hh Ewmh.cc Gnome.hh Gnome.cc Remember.hh Remember.cc \
29
-	ClientPattern.hh ClientPattern.cc Toolbar.hh Toolbar.cc \
30
-	ToolbarTheme.hh ToolbarTheme.cc ToolbarItem.hh ToolbarItem.cc \
31
-	ClockTool.hh ClockTool.cc WorkspaceNameTool.hh \
32
+	RectangleUtil.hh Ewmh.hh Ewmh.cc Gnome.hh Gnome.cc Remember.hh \
33
+	Remember.cc ClientPattern.hh ClientPattern.cc Toolbar.hh \
34
+	Toolbar.cc ToolbarTheme.hh ToolbarTheme.cc ToolbarItem.hh \
35
+	ToolbarItem.cc ClockTool.hh ClockTool.cc WorkspaceNameTool.hh \
36
 	WorkspaceNameTool.cc WorkspaceNameTheme.hh IconbarTool.hh \
37
 	IconbarTool.cc ToolTheme.hh ToolTheme.cc SystemTray.hh \
38
 	SystemTray.cc GenericTool.hh GenericTool.cc ButtonTool.hh \
39
@@ -285,6 +285,7 @@
40
 srcdir = @srcdir@
41
 sysconfdir = @sysconfdir@
42
 target_alias = @target_alias@
43
+top_build_prefix = @top_build_prefix@
44
 top_builddir = @top_builddir@
45
 top_srcdir = @top_srcdir@
46
 SUBDIRS = FbTk
47
@@ -363,6 +364,7 @@
48
 	IconbarTheme.hh IconbarTheme.cc \
49
 	Focusable.hh FocusableList.hh FocusableList.cc FocusableTheme.hh \
50
 	WindowMenuAccessor.hh \
51
+	RectangleUtil.hh \
52
 	${newwmspec_SOURCE} ${gnome_SOURCE} \
53
 	${REMEMBER_SOURCE} ${TOOLBAR_SOURCE}
54
 
(-)/usr/ports/x11-wm/fluxbox/files/patch-aaa07 (-1 / +9 lines)
Lines 6-11 Link Here
6
additional fix for the resize bug
6
additional fix for the resize bug
7
---
7
---
8
8
9
From: Peter Hercek <hercek at sf dot net>
10
Date: Sun, 11 Jan 2009 13:23:08 +0000 (+0100)
11
Subject: fixed resize bug (caused by typo, see #2498507)
12
X-Git-Url: http://git.fluxbox.org/?p=fluxbox.git;a=commitdiff_plain;h=4e831484d55398e5c328aeb531060ffaf997f300
13
14
fixed resize bug (caused by typo, see #2498507)
15
---
16
9
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc
17
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc
10
index ce25004..711e993 100644
18
index ce25004..711e993 100644
11
--- a/src/FbWinFrame.cc
19
--- a/src/FbWinFrame.cc
Lines 23-29 Link Here
23
 void FbWinFrame::applySizeHints(unsigned int &width, unsigned int &height,
31
 void FbWinFrame::applySizeHints(unsigned int &width, unsigned int &height,
24
                                 bool maximizing) const {
32
                                 bool maximizing) const {
25
-    height -= titlebarHeight() + handleHeight();
33
-    height -= titlebarHeight() + handleHeight();
26
+    const int h = height - titlebarHeight() + handleHeight();
34
+    const int h = height - titlebarHeight() - handleHeight();
27
+    height = max(h, static_cast<int>(titlebarHeight() + handleHeight()));
35
+    height = max(h, static_cast<int>(titlebarHeight() + handleHeight()));
28
     sizeHints().apply(width, height, maximizing);
36
     sizeHints().apply(width, height, maximizing);
29
     height += titlebarHeight() + handleHeight();
37
     height += titlebarHeight() + handleHeight();
(-)/usr/ports/x11-wm/fluxbox/files/patch-fix_pixmap_resource_leak (-102 lines)
Lines 1-102 Link Here
1
From 91408776f0b04dbc5a5da99f555b33f9abc5a905 Mon Sep 17 00:00:00 2001
2
From: Henrik Kinnunen <fluxgen@fluxbox.org>
3
Date: Sun, 14 Sep 2008 21:36:16 +0200
4
Subject: [PATCH] Fixed a pixmap resource leak with selected pixmap in menus.
5
6
menu.hilite.selected.pixmap and menu.selected.pixmap was not
7
deleted while switching between non-pixmap styles and pixmap styles.
8
---
9
 ChangeLog                |    3 +++
10
 src/FbTk/ImageControl.cc |    9 ++++++++-
11
 src/FbTk/ImageControl.hh |    5 ++++-
12
 src/FbTk/Menu.cc         |   18 +++++++++++++++---
13
 4 files changed, 30 insertions(+), 5 deletions(-)
14
15
diff --git a/ChangeLog b/ChangeLog
16
--- a/ChangeLog
17
+++ ChangeLog
18
@@ -1,5 +1,8 @@
19
  (Format: Year/Month/Day)
20
 Changes for 1.1
21
+*08/09/14:
22
+   * Fixed a minor pixmap resource leak (Henrik)
23
+     FbTk/Menu.cc, FbTk/ImageControl.cc/hh
24
 *08/09/01:
25
    * When the current menu item gets disabled, highlight its nearest neighbor
26
      and add separators to the focus model menu (Mark)
27
diff --git a/src/FbTk/ImageControl.cc b/src/FbTk/ImageControl.cc
28
--- a/src/FbTk/ImageControl.cc
29
+++ src/FbTk/ImageControl.cc
30
@@ -227,11 +227,18 @@ Pixmap ImageControl::searchCache(unsigned int width, unsigned int height,
31
 
32
 Pixmap ImageControl::renderImage(unsigned int width, unsigned int height,
33
                                  const FbTk::Texture &texture,
34
-                                 FbTk::Orientation orient) {
35
+                                 FbTk::Orientation orient,
36
+                                 bool use_cache ) {
37
 
38
     if (texture.type() & FbTk::Texture::PARENTRELATIVE)
39
         return ParentRelative;
40
 
41
+    // If we are not suppose to cache this pixmap, just render and return it
42
+    if ( ! use_cache) {
43
+        TextureRender image(*this, width, height, orient, m_colors, m_num_colors);
44
+        return image.render(texture);
45
+    }
46
+
47
     // search cache first
48
     Pixmap pixmap = searchCache(width, height, texture, orient);
49
     if (pixmap) {
50
diff --git a/src/FbTk/ImageControl.hh b/src/FbTk/ImageControl.hh
51
--- a/src/FbTk/ImageControl.hh
52
+++ src/FbTk/ImageControl.hh
53
@@ -54,11 +54,14 @@ public:
54
        @param width width of pixmap
55
        @param height height of pixmap
56
        @param src_texture texture type to render
57
+       @param orient Orientation of the texture.
58
+       @param use_cache whether or not to use cache
59
        @return pixmap of the rendered image, on failure None
60
     */
61
     Pixmap renderImage(unsigned int width, unsigned int height,
62
                        const FbTk::Texture &src_texture,
63
-                       Orientation orient = ROT0);
64
+                       Orientation orient = ROT0,
65
+                       bool use_cache = true);
66
 
67
     void installRootColormap();
68
     void removeImage(Pixmap thepix);
69
diff --git a/src/FbTk/Menu.cc b/src/FbTk/Menu.cc
70
--- a/src/FbTk/Menu.cc
71
+++ src/FbTk/Menu.cc
72
@@ -460,12 +460,24 @@ void Menu::updateMenu(int active_index) {
73
 
74
     if (!theme()->selectedPixmap().pixmap().drawable()) {
75
         int hw = theme()->itemHeight() / 2;
76
-        theme()->setSelectedPixmap(m_image_ctrl.renderImage(hw, hw, theme()->hiliteTexture()), true);
77
+        // render image, disable cache and let the theme remove the pixmap
78
+        theme()->setSelectedPixmap(m_image_ctrl.
79
+                                   renderImage(hw, hw,
80
+                                               theme()->hiliteTexture(), ROT0, 
81
+                                               false // no cache
82
+                                               ),  
83
+                                   false); // the theme takes care of this pixmap
84
 
85
         if (!theme()->highlightSelectedPixmap().pixmap().drawable()) {
86
             int hw = theme()->itemHeight() / 2;
87
-            theme()->setHighlightSelectedPixmap(m_image_ctrl.renderImage(hw, hw, theme()->frameTexture()), true);
88
-        }
89
+            // render image, disable cache and let the theme remove the pixmap
90
+            theme()->setHighlightSelectedPixmap(m_image_ctrl.
91
+                                                renderImage(hw, hw,
92
+                                                            theme()->frameTexture(), ROT0, 
93
+                                                            false  // no cache
94
+                                                            ), 
95
+                                                false); // theme takes care of this pixmap
96
+       }
97
     }
98
 
99
     if (m_title_vis) {
100
-- 
101
1.6.0.1
102
(-)/usr/ports/x11-wm/fluxbox/files/patch-fix_unshading_crash (-25 lines)
Lines 1-25 Link Here
1
From bf620f96df0942db356255f8af7f522ae46af82e Mon Sep 17 00:00:00 2001
2
From: Mark Tiefenbruck <mark@fluxbox.org>
3
Date: Thu, 11 Sep 2008 13:01:11 -0700
4
Subject: [PATCH] fix program crashes caused by unshading
5
6
---
7
 src/FbWinFrame.cc |    3 ++-
8
 1 files changed, 2 insertions(+), 1 deletions(-)
9
10
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc
11
--- a/src/FbWinFrame.cc
12
+++ src/FbWinFrame.cc
13
@@ -1489,7 +1489,8 @@ void FbWinFrame::applyDecorations(bool do_move) {
14
         client_move = true;
15
     }
16
 
17
-    reconfigure();
18
+    if (do_move)
19
+        reconfigure();
20
     if (client_move)
21
         frameExtentSig().notify();
22
 }
23
-- 
24
1.6.0.1
25

Return to bug 136136