aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMathias Gumz <akira at fluxbox dot org>2011-02-24 15:56:53 (GMT)
committerMathias Gumz <akira at fluxbox dot org>2011-02-24 15:56:53 (GMT)
commit798ecb88d57e5ed7af24be62a52e6f0ccb87a7de (patch)
treef43b743937fa0d1cd3e786c0e6594bda314749d3 /src
parent4a161132c2aacdbe4a7039f3f73f870607b5bce0 (diff)
downloadfluxbox_pavel-798ecb88d57e5ed7af24be62a52e6f0ccb87a7de.zip
fluxbox_pavel-798ecb88d57e5ed7af24be62a52e6f0ccb87a7de.tar.bz2
cache result of getWorkspace()
Diffstat (limited to 'src')
-rw-r--r--src/Screen.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Screen.cc b/src/Screen.cc
index e13c2c6..39bb966 100644
--- a/src/Screen.cc
+++ b/src/Screen.cc
@@ -1409,8 +1409,9 @@ void BScreen::reassociateWindow(FluxboxWindow *w, unsigned int wkspc_id,
1409 } else if (ignore_sticky || ! w->isStuck()) { 1409 } else if (ignore_sticky || ! w->isStuck()) {
1410 // fresh windows have workspaceNumber == -1, which leads to 1410 // fresh windows have workspaceNumber == -1, which leads to
1411 // an invalid workspace (unsigned int) 1411 // an invalid workspace (unsigned int)
1412 if (getWorkspace(w->workspaceNumber())) 1412 Workspace* ws = getWorkspace(w->workspaceNumber());
1413 getWorkspace(w->workspaceNumber())->removeWindow(w, true); 1413 if (ws)
1414 ws->removeWindow(w, true);
1414 getWorkspace(wkspc_id)->addWindow(*w); 1415 getWorkspace(wkspc_id)->addWindow(*w);
1415 } 1416 }
1416} 1417}