From 4b06331086ba155155239d9e9a174a2dbc48c899 Mon Sep 17 00:00:00 2001 From: tpearson Date: Thu, 6 May 2010 21:35:54 +0000 Subject: Repaired background update problems on desktop resize/background configuration change Added initial framework for panel icon size configuration git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1123766 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdesktop/bgmanager.cc | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'kdesktop/bgmanager.cc') diff --git a/kdesktop/bgmanager.cc b/kdesktop/bgmanager.cc index 7a9fe5fd5..c3317708c 100644 --- a/kdesktop/bgmanager.cc +++ b/kdesktop/bgmanager.cc @@ -243,6 +243,16 @@ void KBackgroundManager::configure() // Repaint desktop slotChangeDesktop(0); + + // Redraw all desktops so that applications relying on exported data, e.g. kpager, continue to work properly + QSize s(m_pKwinmodule->numberOfViewports(m_pKwinmodule->currentDesktop())); + m_numberOfViewports = s.width() * s.height(); + if (m_numberOfViewports < 1) { + m_numberOfViewports = 1; + } + for (unsigned j=0;j<(m_pKwinmodule->numberOfDesktops() * m_numberOfViewports);j++) { + renderBackground(j); + } } @@ -947,8 +957,15 @@ void KBackgroundManager::desktopResized() slotChangeDesktop(0); repaintBackground(); - // Signal KWin that the usable desktop area has probably changed... - // Use the DCOP signal kDestopResized + // Redraw all desktops so that applications relying on exported data, e.g. kpager, continue to work properly + QSize s(m_pKwinmodule->numberOfViewports(m_pKwinmodule->currentDesktop())); + m_numberOfViewports = s.width() * s.height(); + if (m_numberOfViewports < 1) { + m_numberOfViewports = 1; + } + for (unsigned j=0;j<(m_pKwinmodule->numberOfDesktops() * m_numberOfViewports);j++) { + renderBackground(j); + } } // DCOP exported -- cgit v1.2.1