cache result of getWorkspace()

This commit is contained in:
Mathias Gumz 2011-02-24 16:56:53 +01:00
parent 4a161132c2
commit 798ecb88d5

View file

@ -1409,8 +1409,9 @@ void BScreen::reassociateWindow(FluxboxWindow *w, unsigned int wkspc_id,
} else if (ignore_sticky || ! w->isStuck()) {
// fresh windows have workspaceNumber == -1, which leads to
// an invalid workspace (unsigned int)
if (getWorkspace(w->workspaceNumber()))
getWorkspace(w->workspaceNumber())->removeWindow(w, true);
Workspace* ws = getWorkspace(w->workspaceNumber());
if (ws)
ws->removeWindow(w, true);
getWorkspace(wkspc_id)->addWindow(*w);
}
}