kwin: updateClientArea /after/ invalidating the screenareas

prevents segfaults when collpasing several desktops containing clients
This commit is contained in:
Thomas Lübking 2011-04-14 17:39:16 +02:00
parent d6943f1075
commit 6c89064e10

View file

@ -1649,7 +1649,6 @@ void Workspace::setNumberOfDesktops(int n)
NETPoint* viewports = new NETPoint[n];
rootInfo->setDesktopViewport(n, *viewports);
delete[] viewports;
updateClientArea(true);
// Make it +1, so that it can be accessed as [1..numberofdesktops]
focus_chain.resize(n + 1);
@ -1662,6 +1661,8 @@ void Workspace::setNumberOfDesktops(int n)
oldrestrictedmovearea.resize(n + 1);
screenarea.clear();
updateClientArea(true);
// Resize and reset the desktop focus chain.
desktop_focus_chain.resize(n);
for (int i = 0; i < int(desktop_focus_chain.size()); i++)