From 6c89064e104f8fa5e71f85e961578501bf16a043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Thu, 14 Apr 2011 17:39:16 +0200 Subject: [PATCH] kwin: updateClientArea /after/ invalidating the screenareas prevents segfaults when collpasing several desktops containing clients --- workspace.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/workspace.cpp b/workspace.cpp index f5fc5eaa8d..117be4c62e 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -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++)