diff options
-rw-r--r-- | x11-wm/fluxbox/ChangeLog | 10 | ||||
-rw-r--r-- | x11-wm/fluxbox/files/fbsetbg-quiet-1.1.1.patch | 74 | ||||
-rw-r--r-- | x11-wm/fluxbox/files/keyparse_hang.patch | 13 | ||||
-rw-r--r-- | x11-wm/fluxbox/files/macrocmd-crash-1.1.1.patch | 68 | ||||
-rw-r--r-- | x11-wm/fluxbox/files/mousefocus-1.1.1.patch | 240 | ||||
-rw-r--r-- | x11-wm/fluxbox/fluxbox-1.1.1-r1.ebuild (renamed from x11-wm/fluxbox/fluxbox-1.1.1.ebuild) | 15 |
6 files changed, 400 insertions, 20 deletions
diff --git a/x11-wm/fluxbox/ChangeLog b/x11-wm/fluxbox/ChangeLog index c4c95352f9b6..f809a4f6c4cd 100644 --- a/x11-wm/fluxbox/ChangeLog +++ b/x11-wm/fluxbox/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for x11-wm/fluxbox # Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-wm/fluxbox/ChangeLog,v 1.265 2009/04/08 16:40:32 lack Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-wm/fluxbox/ChangeLog,v 1.266 2009/05/26 16:53:38 lack Exp $ + +*fluxbox-1.1.1-r1 (26 May 2009) + + 26 May 2009; Jim Ramsay <lack@gentoo.org> + +files/fbsetbg-quiet-1.1.1.patch, +files/macrocmd-crash-1.1.1.patch, + +files/mousefocus-1.1.1.patch, -files/keyparse_hang.patch, + -fluxbox-1.1.1.ebuild, +fluxbox-1.1.1-r1.ebuild: + Added patches for all known 1.1.1 bugs 08 Apr 2009; Jim Ramsay <lack@gentoo.org> +files/keyparse_hang.patch, fluxbox-1.1.0.1.ebuild, fluxbox-1.1.1.ebuild: diff --git a/x11-wm/fluxbox/files/fbsetbg-quiet-1.1.1.patch b/x11-wm/fluxbox/files/fbsetbg-quiet-1.1.1.patch new file mode 100644 index 000000000000..a74a4ffb041c --- /dev/null +++ b/x11-wm/fluxbox/files/fbsetbg-quiet-1.1.1.patch @@ -0,0 +1,74 @@ +From 2c60fe4addd9480d78bf6d41c4aa9c179c70df01 Mon Sep 17 00:00:00 2001 +From: Jim Ramsay <i.am@jimramsay.com> +Date: Fri, 24 Apr 2009 11:25:08 -0400 +Subject: [PATCH 1/2] Allow 'background: unset' + +When a user sets 'background: none' it really means "Do not let themes touch the +background I have already set with fbsetbg" -> It does still actually call +fbsetbeg to re-assert the proper background. + +This new value 'unset' is for users who will use an alternate method to set +their background (root-tail, xscreensaver, or whatever). It instructs fluxbox +to *never* run fbsetbg. +--- + src/RootTheme.cc | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/src/RootTheme.cc b/src/RootTheme.cc +index 049eb27..34c06e9 100644 +--- a/src/RootTheme.cc ++++ b/src/RootTheme.cc +@@ -202,6 +202,10 @@ void RootTheme::reconfigTheme() { + filename = FbTk::StringUtil::expandFilename(filename); + std::string cmd = realProgramName("fbsetbg") + (m_first ? " -z " : " -Z "); + ++ // user explicitly requests NO background be set at all ++ if (strstr(m_background->options().c_str(), "unset") != 0) { ++ return; ++ } + // style doesn't wish to change the background + if (strstr(m_background->options().c_str(), "none") != 0) { + if (!m_first) +-- +1.6.2 + + +From 23857ca509be6a8ffa306c23c8d39942105a13f9 Mon Sep 17 00:00:00 2001 +From: Jim Ramsay <i.am@jimramsay.com> +Date: Fri, 24 Apr 2009 14:15:58 -0400 +Subject: [PATCH 2/2] Don't complain on '-z' if there's no lastwallpaper + +This hides the odd cornercase of users with no lastwallpaper file and no +background set in their style or overlay. + +Adapted from the patch at +http://sourceforge.net/tracker/?func=detail&aid=2389567&group_id=35398&atid=413962 +--- + util/fbsetbg | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/util/fbsetbg b/util/fbsetbg +index a12d427..47aa33b 100644 +--- a/util/fbsetbg ++++ b/util/fbsetbg +@@ -308,6 +308,7 @@ while [ $# -gt 0 ]; do + remember=false + break + fi ++ ignore_missing_wallpaper=true + style="style" + shift ;; + -Z) +@@ -521,6 +522,9 @@ fi + + + if [ ! -r "$wallpaper" ]; then ++ if [ "$ignore_missing_wallpaper" == "true" ]; then ++ exit 0 ++ fi + message "Can't find wallpaper $wallpaper" + exit 1 + fi +-- +1.6.2 + diff --git a/x11-wm/fluxbox/files/keyparse_hang.patch b/x11-wm/fluxbox/files/keyparse_hang.patch deleted file mode 100644 index b9f8a5896a74..000000000000 --- a/x11-wm/fluxbox/files/keyparse_hang.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/src/FbTk/StringUtil.hh b/src/FbTk/StringUtil.hh -index 75fa69e..35f23a2 100644 ---- a/src/FbTk/StringUtil.hh -+++ b/src/FbTk/StringUtil.hh -@@ -84,7 +84,7 @@ static void stringTokensBetween(Container &container, const std::string &in, - while (true) { - err = getStringBetween(token, in.c_str() + pos, first, last, ok_chars, - allow_nesting); -- if (err == 0) -+ if (err <= 0) - break; - container.push_back(token); - pos += err; diff --git a/x11-wm/fluxbox/files/macrocmd-crash-1.1.1.patch b/x11-wm/fluxbox/files/macrocmd-crash-1.1.1.patch new file mode 100644 index 000000000000..2d5d1bda78dd --- /dev/null +++ b/x11-wm/fluxbox/files/macrocmd-crash-1.1.1.patch @@ -0,0 +1,68 @@ +From 183e6666f6afd7973f60f2253187e8c24b58b6b1 Mon Sep 17 00:00:00 2001 +From: Jim Ramsay <i.am@jimramsay.com> +Date: Mon, 6 Apr 2009 17:25:01 -0400 +Subject: [PATCH 1/2] Exit loop for unterminated { } pair + +--- + src/FbTk/StringUtil.hh | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/src/FbTk/StringUtil.hh b/src/FbTk/StringUtil.hh +index 75fa69e..35f23a2 100644 +--- a/src/FbTk/StringUtil.hh ++++ b/src/FbTk/StringUtil.hh +@@ -84,7 +84,7 @@ static void stringTokensBetween(Container &container, const std::string &in, + while (true) { + err = getStringBetween(token, in.c_str() + pos, first, last, ok_chars, + allow_nesting); +- if (err == 0) ++ if (err <= 0) + break; + container.push_back(token); + pos += err; +-- +1.6.2 + + +From 55c45305d4f6973f5fbecec1e527e55dd6bd9fa5 Mon Sep 17 00:00:00 2001 +From: Jim Ramsay <i.am@jimramsay.com> +Date: Wed, 8 Apr 2009 10:57:04 -0400 +Subject: [PATCH 2/2] Error on incomplete MacroCmd key command + +--- + src/FbTk/MacroCommand.cc | 16 +++++++++------- + 1 files changed, 9 insertions(+), 7 deletions(-) + +diff --git a/src/FbTk/MacroCommand.cc b/src/FbTk/MacroCommand.cc +index 511683b..555e5f5 100644 +--- a/src/FbTk/MacroCommand.cc ++++ b/src/FbTk/MacroCommand.cc +@@ -33,16 +33,18 @@ namespace { + template <typename M> + M *addCommands(M *macro, const std::string &args, bool trusted) { + +- std::string blah; ++ std::string remainder; + std::list<std::string> cmds; +- StringUtil::stringTokensBetween(cmds, args, blah, '{', '}'); ++ StringUtil::stringTokensBetween(cmds, args, remainder, '{', '}'); + RefCount<Command<void> > cmd(0); + +- std::list<std::string>::iterator it = cmds.begin(), it_end = cmds.end(); +- for (; it != it_end; ++it) { +- cmd = CommandParser<void>::instance().parse(*it, trusted); +- if (*cmd) +- macro->add(cmd); ++ if (remainder.length() == 0) { ++ std::list<std::string>::iterator it = cmds.begin(), it_end = cmds.end(); ++ for (; it != it_end; ++it) { ++ cmd = CommandParser<void>::instance().parse(*it, trusted); ++ if (*cmd) ++ macro->add(cmd); ++ } + } + + if (macro->size() > 0) +-- +1.6.2 + diff --git a/x11-wm/fluxbox/files/mousefocus-1.1.1.patch b/x11-wm/fluxbox/files/mousefocus-1.1.1.patch new file mode 100644 index 000000000000..12cc1cb78999 --- /dev/null +++ b/x11-wm/fluxbox/files/mousefocus-1.1.1.patch @@ -0,0 +1,240 @@ +From 5c7784affe78467d7ef4e52e22da83c341622d53 Mon Sep 17 00:00:00 2001 +From: Jim Ramsay <i.am@jimramsay.com> +Date: Fri, 30 Jan 2009 10:41:27 -0500 +Subject: [PATCH 1/5] Added facility to selectively ignore EnterNotify events + +This will be used to avoid some situations where an EnterNotify event should not +focus the window beneath the mouse cursor. For example, when a menu (or any +window for that matter) is unmapped, focus should not pass to whatever window is +beneath the current location of the mouse cursor, but to the previous window in +the focus list. + +This was first noticed when using the ClientMenu feature with +focus-follows-mouse on -> The focus would always end up on the window beneath +the mouse pointer, not the window selected in the menu. +--- + src/FocusControl.cc | 25 ++++++++++++++++++++++++- + src/FocusControl.hh | 10 ++++++++++ + src/Window.cc | 8 ++++++-- + 3 files changed, 40 insertions(+), 3 deletions(-) + +diff --git a/src/FocusControl.cc b/src/FocusControl.cc +index 78752bb..701373b 100644 +--- a/src/FocusControl.cc ++++ b/src/FocusControl.cc +@@ -81,7 +81,8 @@ FocusControl::FocusControl(BScreen &screen): + m_focused_win_list(screen), m_creation_order_win_list(screen), + m_cycling_list(0), + m_was_iconic(false), +- m_cycling_last(0) { ++ m_cycling_last(0), ++ m_ignore_mouse_x(-1), m_ignore_mouse_y(-1) { + + m_cycling_window = m_focused_list.clientList().end(); + +@@ -400,6 +401,28 @@ void FocusControl::dirFocus(FluxboxWindow &win, FocusDir dir) { + + } + ++void FocusControl::ignoreAtPointer() ++{ ++ int ignore_i; ++ unsigned int ignore_ui; ++ Window ignore_w; ++ ++ XQueryPointer(m_screen.rootWindow().display(), ++ m_screen.rootWindow().window(), &ignore_w, &ignore_w, ++ &m_ignore_mouse_x, &m_ignore_mouse_y, ++ &ignore_i, &ignore_i, &ignore_ui); ++} ++ ++void FocusControl::ignoreAt(int x, int y) ++{ ++ m_ignore_mouse_x = x; m_ignore_mouse_y = y; ++} ++ ++bool FocusControl::isIgnored(int x, int y) ++{ ++ return x == m_ignore_mouse_x && y == m_ignore_mouse_y; ++} ++ + void FocusControl::removeClient(WinClient &client) { + if (client.screen().isShuttingdown()) + return; +diff --git a/src/FocusControl.hh b/src/FocusControl.hh +index 4de4310..91681ab 100644 +--- a/src/FocusControl.hh ++++ b/src/FocusControl.hh +@@ -93,6 +93,15 @@ public: + bool isMouseFocus() const { return focusModel() == MOUSEFOCUS; } + /// @return true if tab focus mode is mouse tab focus + bool isMouseTabFocus() const { return tabFocusModel() == MOUSETABFOCUS; } ++ ++ /// Set the "ignore" pointer location to the current pointer location ++ void ignoreAtPointer(); ++ /// Set the "ignore" pointer location to the given coordinates ++ void ignoreAt(int x, int y); ++ /// @return true if events at the given X/Y coordinate should be ignored ++ /// (ie, they were previously cached via one of the ignoreAt calls) ++ bool isIgnored(int x, int y); ++ + /// @return true if cycling is in progress + bool isCycling() const { return m_cycling_list != 0; } + /// Appends a client to the front of the focus list +@@ -157,6 +166,7 @@ private: + const FocusableList *m_cycling_list; + Focusable *m_was_iconic; + WinClient *m_cycling_last; ++ int m_ignore_mouse_x, m_ignore_mouse_y; + + static WinClient *s_focused_window; + static FluxboxWindow *s_focused_fbwindow; +diff --git a/src/Window.cc b/src/Window.cc +index 4b4d1dc..513fbb6 100644 +--- a/src/Window.cc ++++ b/src/Window.cc +@@ -2680,13 +2680,17 @@ void FluxboxWindow::enterNotifyEvent(XCrossingEvent &ev) { + sa.enter = sa.leave = False; + XCheckIfEvent(display, &dummy, queueScanner, (char *) &sa); + +- if ((!sa.leave || sa.inferior) && !screen().focusControl().isCycling() ) { ++ if ((!sa.leave || sa.inferior) && ++ !screen().focusControl().isCycling() && ++ !screen().focusControl().isIgnored(ev.x_root, ev.y_root) ) { + focus(); + } + } + } + +- if (screen().focusControl().isMouseTabFocus() && client && client != m_client) { ++ if (screen().focusControl().isMouseTabFocus() && ++ client && client != m_client && ++ !screen().focusControl().isIgnored(ev.x_root, ev.y_root) ) { + setCurrentClient(*client, isFocused()); + } + +-- +1.6.2 + + +From 76ea1d9bbe3f3b7edb15da1a67652982edd5f646 Mon Sep 17 00:00:00 2001 +From: Jim Ramsay <i.am@jimramsay.com> +Date: Fri, 30 Jan 2009 10:47:24 -0500 +Subject: [PATCH 2/5] Ignore EnterNotify on Unmap + +This is the basic condition that was first noticed because of the effect of the +ClientMenu window unmapping and the resulting EnterNotify event stealing focus +from the window selected in that menu. But to be complete, any window unmapping +should cause focus to move to the next in the last-recently-focused window list, +not the one that happens to be beneath the mouse cursor. +--- + src/fluxbox.cc | 5 +++++ + 1 files changed, 5 insertions(+), 0 deletions(-) + +diff --git a/src/fluxbox.cc b/src/fluxbox.cc +index 93768da..f44f8aa 100644 +--- a/src/fluxbox.cc ++++ b/src/fluxbox.cc +@@ -899,6 +899,11 @@ void Fluxbox::handleUnmapNotify(XUnmapEvent &ue) { + + BScreen *screen = searchScreen(ue.event); + ++ if (screen) { ++ /* Ignore all EnterNotify events until the pointer actually moves */ ++ screen->focusControl().ignoreAtPointer(); ++ } ++ + if (ue.event != ue.window && (!screen || !ue.send_event)) { + return; + } +-- +1.6.2 + + +From 8a7879913ba7169224e18db81888a49e732c1819 Mon Sep 17 00:00:00 2001 +From: Jim Ramsay <i.am@jimramsay.com> +Date: Fri, 30 Jan 2009 10:51:10 -0500 +Subject: [PATCH 3/5] Ignore EnterNotify on Lower + +Lower is one of the actions which may reveal a window under the current mouse +pointer which would unexpectedly change focus under focus-folows-mouse. +--- + src/Window.cc | 4 ++++ + 1 files changed, 4 insertions(+), 0 deletions(-) + +diff --git a/src/Window.cc b/src/Window.cc +index 513fbb6..35d9b80 100644 +--- a/src/Window.cc ++++ b/src/Window.cc +@@ -1668,6 +1668,10 @@ void FluxboxWindow::lower() { + #ifdef DEBUG + cerr<<"FluxboxWindow("<<title()<<")::lower()"<<endl; + #endif // DEBUG ++ ++ /* Ignore all EnterNotify events until the pointer actually moves */ ++ screen().focusControl().ignoreAtPointer(); ++ + // get root window + WinClient *client = getRootTransientFor(m_client); + +-- +1.6.2 + + +From 54c1ac8704c2ad81a597547912bdbf5cbf7967d9 Mon Sep 17 00:00:00 2001 +From: Jim Ramsay <i.am@jimramsay.com> +Date: Fri, 30 Jan 2009 10:54:04 -0500 +Subject: [PATCH 4/5] Ignore EnterNotify on Move or Resize + +Moving and Resizing windows can reveal other windows, which of course can change +unexpected focus changes in focus-follows-mouse. +--- + src/Window.cc | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/src/Window.cc b/src/Window.cc +index 35d9b80..1104e50 100644 +--- a/src/Window.cc ++++ b/src/Window.cc +@@ -1211,6 +1211,9 @@ void FluxboxWindow::moveResize(int new_x, int new_y, + if (!moving) { + m_last_resize_x = new_x; + m_last_resize_y = new_y; ++ ++ /* Ignore all EnterNotify events until the pointer actually moves */ ++ screen().focusControl().ignoreAtPointer(); + } + + } +-- +1.6.2 + + +From c1dee4a4055f8f0dafadeca508ff5568e2d0ce08 Mon Sep 17 00:00:00 2001 +From: Jim Ramsay <i.am@jimramsay.com> +Date: Mon, 9 Mar 2009 14:05:41 -0400 +Subject: [PATCH 5/5] Ignore EnterNotify on workspace change + +Changing workspaces also reveals other windows, which causes unexpected focus +changes. +--- + src/Screen.cc | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/src/Screen.cc b/src/Screen.cc +index 8b605e7..4d9a65f 100644 +--- a/src/Screen.cc ++++ b/src/Screen.cc +@@ -1098,6 +1098,9 @@ void BScreen::changeWorkspaceID(unsigned int id, bool revert) { + id == m_current_workspace->workspaceID()) + return; + ++ /* Ignore all EnterNotify events until the pointer actually moves */ ++ this->focusControl().ignoreAtPointer(); ++ + FbTk::App::instance()->sync(false); + + FluxboxWindow *focused = FocusControl::focusedFbWindow(); +-- +1.6.2 + diff --git a/x11-wm/fluxbox/fluxbox-1.1.1.ebuild b/x11-wm/fluxbox/fluxbox-1.1.1-r1.ebuild index d64b0a8744e2..4d43860ac8ab 100644 --- a/x11-wm/fluxbox/fluxbox-1.1.1.ebuild +++ b/x11-wm/fluxbox/fluxbox-1.1.1-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-wm/fluxbox/fluxbox-1.1.1.ebuild,v 1.5 2009/04/08 16:40:32 lack Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-wm/fluxbox/fluxbox-1.1.1-r1.ebuild,v 1.1 2009/05/26 16:53:38 lack Exp $ EAPI="2" inherit eutils @@ -38,17 +38,20 @@ SLOT="0" LICENSE="MIT" KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" -src_unpack() { - unpack ${A} - cd "${S}" - +src_prepare() { # We need to be able to include directories rather than just plain # files in menu [include] items. This patch will allow us to do clever # things with style ebuilds. epatch "${FILESDIR}/gentoo_style_location-1.1.x.patch" # Patch to handle a broken key file gracefully, #263379 - epatch "${FILESDIR}/keyparse_hang.patch" + epatch "${FILESDIR}/macrocmd-crash-1.1.1.patch" + + # Patch to quiet fbsetbg on upgrade + epatch "${FILESDIR}/fbsetbg-quiet-1.1.1.patch" + + # Patch to fix window focus bug when you have "focus-follows-mouse" + epatch "${FILESDIR}/mousefocus-1.1.1.patch" # Add in the Gentoo -r number to fluxbox -version output. if [[ "${PR}" == "r0" ]] ; then |