summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-10-11 19:29:25 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-10-11 19:29:25 -0500
commit2771be621097ef41405e184507fcf10b8b091ae0 (patch)
tree892b850506591d371e7cae0d23467b60eadd3cea
parent08bbf7c85be860a04e0be588d9ae4d635faf4c28 (diff)
downloadtdelibs-2771be621097ef41405e184507fcf10b8b091ae0.tar.gz
tdelibs-2771be621097ef41405e184507fcf10b8b091ae0.zip
Fix KRootBacking failure when no window is displayed
This partially resolves Bug 811
-rw-r--r--libkscreensaver/kscreensaver.cpp2
-rw-r--r--tdeui/krootpixmap.cpp3
2 files changed, 4 insertions, 1 deletions
diff --git a/libkscreensaver/kscreensaver.cpp b/libkscreensaver/kscreensaver.cpp
index 2b45c9a0f..4c7b343cb 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(tqt_xdisplay(), false);
+
d = new KScreenSaverPrivate;
d->owner = TQT_TQWIDGET(find( id ));
if ( d->owner )
diff --git a/tdeui/krootpixmap.cpp b/tdeui/krootpixmap.cpp
index 539a45e27..3530b5d45 100644
--- a/tdeui/krootpixmap.cpp
+++ b/tdeui/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);