From bed4ba4d65dba0d12a8352a46436f25ce3d0e7d1 Mon Sep 17 00:00:00 2001 From: markt <markt> Date: Mon, 12 Nov 2007 23:16:13 +0000 Subject: a little fix for focusing lowered tabs on other workspaces --- src/Screen.cc | 6 +++--- src/Screen.hh | 2 +- src/Window.cc | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Screen.cc b/src/Screen.cc index a53792b..1557409 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -1185,7 +1185,7 @@ int BScreen::removeLastWorkspace() { } -void BScreen::changeWorkspaceID(unsigned int id) { +void BScreen::changeWorkspaceID(unsigned int id, bool revert) { if (! m_current_workspace || id >= m_workspaces_list.size() || id == m_current_workspace->workspaceID()) @@ -1228,7 +1228,7 @@ void BScreen::changeWorkspaceID(unsigned int id) { if (focused && focused->isMoving()) { focused->focus(); focused->resumeMoving(); - } else + } else if (revert) FocusControl::revertFocus(*this); old->hideAll(false); @@ -1257,7 +1257,7 @@ void BScreen::sendToWorkspace(unsigned int id, FluxboxWindow *win, bool changeWS // change workspace ? if (changeWS) - changeWorkspaceID(id); + changeWorkspaceID(id, false); // if the window is on current workspace, show it; else hide it. if (id == currentWorkspace()->workspaceID() && !win->isIconic()) diff --git a/src/Screen.hh b/src/Screen.hh index 953411c..ac27df1 100644 --- a/src/Screen.hh +++ b/src/Screen.hh @@ -360,7 +360,7 @@ public: */ std::string getNameOfWorkspace(unsigned int workspace) const; /// changes workspace to specified id - void changeWorkspaceID(unsigned int); + void changeWorkspaceID(unsigned int, bool revert = true); /** * Sends a window to a workspace * @param workspace the workspace id diff --git a/src/Window.cc b/src/Window.cc index 903756a..aae258c 100644 --- a/src/Window.cc +++ b/src/Window.cc @@ -1316,7 +1316,7 @@ bool FluxboxWindow::focus() { screen().sendToWorkspace(screen().currentWorkspaceID(), this, false); // warp to the workspace of the window else - screen().changeWorkspaceID(workspaceNumber()); + screen().changeWorkspaceID(workspaceNumber(), false); } if (isIconic()) { -- cgit v0.11.2