From e0d61ab4f5d43abda220ab9ee7069f897bc713c4 Mon Sep 17 00:00:00 2001 From: rathnor Date: Tue, 15 Apr 2003 13:58:57 +0000 Subject: use most recently focused window to attach (using screen's focus list) (Simon) --- src/fluxbox.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/fluxbox.cc b/src/fluxbox.cc index 9939c90..b9fa1aa 100644 --- a/src/fluxbox.cc +++ b/src/fluxbox.cc @@ -22,7 +22,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: fluxbox.cc,v 1.109 2003/04/15 12:11:54 fluxgen Exp $ +// $Id: fluxbox.cc,v 1.110 2003/04/15 13:58:57 rathnor Exp $ #include "fluxbox.hh" @@ -1190,10 +1190,12 @@ void Fluxbox::handleKeyEvent(XKeyEvent &ke) { Workspace::Windows &wins = space->getWindowList(); if (wins.size() == 1) break; - Workspace::Windows::iterator it = wins.begin(); - for (; it != wins.end(); ++it) { - if ((*it) != focused_window) { - focused_window->attachClient((*it)->winClient()); + BScreen::FocusedWindows &fwins = screen->getFocusedList(); + BScreen::FocusedWindows::iterator it = fwins.begin(); + for (; it != fwins.end(); ++it) { + if ((*it)->fbwindow() != focused_window && + (*it)->fbwindow()->getWorkspaceNumber() == screen->getCurrentWorkspaceID()) { + focused_window->attachClient(**it); break; } } -- cgit v0.11.2