a little fix for focusing lowered tabs on other workspaces

This commit is contained in:
markt 2007-11-12 23:16:13 +00:00
parent 5d7043320d
commit bed4ba4d65
3 changed files with 5 additions and 5 deletions

View file

@ -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())

View file

@ -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

View file

@ -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()) {