summaryrefslogtreecommitdiffstats
path: root/kpager/desktop.cpp
diff options
context:
space:
mode:
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));
+ }
}