From a6463653b91eee5f8a79171f76c8a96328a7e8dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=BCbking?= Date: Sat, 26 May 2012 21:06:40 +0200 Subject: [PATCH] move reinitCascading to setNumberOfDesktops because it updates an internal list that is trusted to be of (at least) desktopCount_ size BUG: 174118 FIXED-IN: 4.9 REVIEW: 105063 --- workspace.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/workspace.cpp b/workspace.cpp index 12bcdcf9ef..f64dc6453f 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -385,6 +385,9 @@ void Workspace::init() // Create an entry with empty activity name, it will be used if activities are not supported. Otherwise, it will be removed. m_desktopFocusChain = m_activitiesDesktopFocusChain.insert(QString(), QVector(numberOfDesktops())); + // Now we know how many desktops we'll have, thus we initialize the positioning object + initPositioning = new Placement(this); + loadDesktopSettings(); updateDesktopLayout(); // Extra NETRootInfo instance in Client mode is needed to get the values of the properties @@ -402,9 +405,6 @@ void Workspace::init() updateActivityList(false, true); #endif - // Now we know how many desktops we'll have, thus we initialize the positioning object - initPositioning = new Placement(this); - reconfigureTimer.setSingleShot(true); updateToolWindowsTimer.setSingleShot(true); @@ -973,7 +973,6 @@ void Workspace::slotReconfigure() unsigned long changed = options->updateSettings(); emit configChanged(); - initPositioning->reinitCascading(0); discardPopup(); updateToolWindows(true); @@ -1698,6 +1697,7 @@ void Workspace::setNumberOfDesktops(int n) return; int old_number_of_desktops = numberOfDesktops(); desktopCount_ = n; + initPositioning->reinitCascading(0); updateDesktopLayout(); // Make sure the layout is still valid if (currentDesktop() > n)