From kde-commits Thu Dec 11 19:07:09 2008 From: =?utf-8?q?Aaron=20J=2E=20Seigo?= Date: Thu, 11 Dec 2008 19:07:09 +0000 To: kde-commits Subject: KDE/kdebase/workspace/plasma/applets/pager Message-Id: <1229022429.676240.3973.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=122902243818195 SVN commit 895783 by aseigo: * check the size of m_rects before accessing it * instantly trigger a recalc of the window geometries when the number of desktops change i hope this is the last of this particular bug. please update and check. CCBUG:177513 CCBUG:177479 M +4 -6 pager.cpp --- trunk/KDE/kdebase/workspace/plasma/applets/pager/pager.cpp #895782:895783 @@ -524,17 +524,15 @@ } m_dirtyDesktop = -1; - m_desktopCount = num; + if (m_rows > m_desktopCount) { m_rows = m_desktopCount; } + m_rects.clear(); recalculateGeometry(); - - if (!m_timer->isActive()) { - m_timer->start(UPDATE_DELAY); - } + recalculateWindowRects(); } void Pager::desktopNamesChanged() @@ -982,7 +980,7 @@ if (m_dragId == m_windowRects[i][j].first) { rect.translate((m_dragCurrentPos - m_dragOriginalPos).toPoint()); painter->setClipRect(option->exposedRect); - } else { + } else if (i < m_rects.count()) { painter->setClipRect(m_rects[i].adjusted(1, 1, -1, -1)); } painter->drawRect(rect);