cache result of getWorkspace()
This commit is contained in:
parent
4a161132c2
commit
798ecb88d5
1 changed files with 3 additions and 2 deletions
|
@ -1409,8 +1409,9 @@ void BScreen::reassociateWindow(FluxboxWindow *w, unsigned int wkspc_id,
|
||||||
} else if (ignore_sticky || ! w->isStuck()) {
|
} else if (ignore_sticky || ! w->isStuck()) {
|
||||||
// fresh windows have workspaceNumber == -1, which leads to
|
// fresh windows have workspaceNumber == -1, which leads to
|
||||||
// an invalid workspace (unsigned int)
|
// an invalid workspace (unsigned int)
|
||||||
if (getWorkspace(w->workspaceNumber()))
|
Workspace* ws = getWorkspace(w->workspaceNumber());
|
||||||
getWorkspace(w->workspaceNumber())->removeWindow(w, true);
|
if (ws)
|
||||||
|
ws->removeWindow(w, true);
|
||||||
getWorkspace(wkspc_id)->addWindow(*w);
|
getWorkspace(wkspc_id)->addWindow(*w);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue