diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-10-11 19:29:25 -0500 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2012-10-20 17:51:11 +0200 |
commit | 4d18026be07791bd9f64dacd76eb0b5362d49c56 (patch) | |
tree | d924f0eb58f1977f87d85ebc605026a93b39c2b2 | |
parent | 154a72147f3f6272458f6e46313907fb77fe6ade (diff) | |
download | tdelibs-4d18026be07791bd9f64dacd76eb0b5362d49c56.tar.gz tdelibs-4d18026be07791bd9f64dacd76eb0b5362d49c56.zip |
Fix KRootBacking failure when no window is displayed
This partially resolves Bug 811
(cherry picked from commit 2771be621097ef41405e184507fcf10b8b091ae0)
-rw-r--r-- | kdeui/krootpixmap.cpp | 3 | ||||
-rw-r--r-- | libkscreensaver/kscreensaver.cpp | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/kdeui/krootpixmap.cpp b/kdeui/krootpixmap.cpp index e0716259e..8ed998476 100644 --- a/kdeui/krootpixmap.cpp +++ b/kdeui/krootpixmap.cpp @@ -234,8 +234,9 @@ void KRootPixmap::repaint(bool force) m_Rect = TQRect(p1, p2); #ifdef Q_WS_X11 m_Desk = KWin::windowInfo(m_pWidget->topLevelWidget()->winId()).desktop(); - if (m_Desk == NET::OnAllDesktops) + if ((m_Desk == NET::OnAllDesktops) || (m_Desk == 0)) { m_Desk = currentDesktop(); + } // KSharedPixmap will correctly generate a tile for us. m_pPixmap->loadFromShared(pixmapName(m_Desk), m_Rect); diff --git a/libkscreensaver/kscreensaver.cpp b/libkscreensaver/kscreensaver.cpp index 92aa8f931..e4c98bb0b 100644 --- a/libkscreensaver/kscreensaver.cpp +++ b/libkscreensaver/kscreensaver.cpp @@ -47,6 +47,8 @@ KScreenSaver::KScreenSaver( WId id ) : TQWidget() unsigned int w = 0; unsigned int h = 0; + XSync(qt_xdisplay(), false); + d = new KScreenSaverPrivate; d->owner = TQT_TQWIDGET(find( id )); if ( d->owner ) |