summaryrefslogtreecommitdiffstats
path: root/kpager/desktop.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-03-29 23:34:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-03-29 23:34:07 +0000
commit1c9a50141d128a02150d0adca3684f957e3e994f (patch)
treea08456d54c4a86731e77267069e5a02ef025d5ed /kpager/desktop.cpp
parentab252e87d243d448bb66749ee5836883fd5431a9 (diff)
downloadtdebase-1c9a50141d128a02150d0adca3684f957e3e994f.tar.gz
tdebase-1c9a50141d128a02150d0adca3684f957e3e994f.zip
Fixed pager background loading failure on inactive desktop and high CPU usage on Desktop 1
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1108873 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kpager/desktop.cpp')
-rw-r--r--kpager/desktop.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/kpager/desktop.cpp b/kpager/desktop.cpp
index 1ecfcca43..cb41bb04c 100644
--- a/kpager/desktop.cpp
+++ b/kpager/desktop.cpp
@@ -198,6 +198,8 @@ QPixmap fastScalePixmap(const QPixmap &pixmap, int width, int height)
void Desktop::loadBgPixmap(void)
{
+ bool retval;
+
// if (!m_bgDirty) return;
DCOPClient *client = kapp->dcopClient();
if (!client->isAttached())
@@ -252,17 +254,19 @@ void Desktop::loadBgPixmap(void)
kdDebug() << "getting whole bg through shpixmap\n";
*/
- QDataStream args( data, IO_WriteOnly );
- args << 1;
- client->send( "kdesktop", "KBackgroundIface", "setExport(int)", data );
-
if (!m_bgPixmap)
{
m_bgPixmap = new KSharedPixmap;
connect(m_bgPixmap, SIGNAL(done(bool)), SLOT(backgroundLoaded(bool)));
}
- m_bgPixmap->loadFromShared(QString("DESKTOP%1").arg(m_isCommon?1:m_desk));
+ retval = m_bgPixmap->loadFromShared(QString("DESKTOP%1").arg(m_isCommon?1:m_desk));
+ if (retval == false) {
+ QDataStream args( data, IO_WriteOnly );
+ args << 1; // Argument is 1 (true)
+ client->send("kdesktop", "KBackgroundIface", "setExport(int)", data);
+ retval = m_bgPixmap->loadFromShared(QString("DESKTOP%1").arg(m_isCommon?1:m_desk));
+ }
}