Fix KRootBacking failure when no window is displayed

This partially resolves Bug 811
pull/16/head
Timothy Pearson 12 years ago
parent 08bbf7c85b
commit 2771be6210

@ -47,6 +47,8 @@ KScreenSaver::KScreenSaver( WId id ) : TQWidget()
unsigned int w = 0; unsigned int w = 0;
unsigned int h = 0; unsigned int h = 0;
XSync(tqt_xdisplay(), false);
d = new KScreenSaverPrivate; d = new KScreenSaverPrivate;
d->owner = TQT_TQWIDGET(find( id )); d->owner = TQT_TQWIDGET(find( id ));
if ( d->owner ) if ( d->owner )

@ -234,8 +234,9 @@ void KRootPixmap::repaint(bool force)
m_Rect = TQRect(p1, p2); m_Rect = TQRect(p1, p2);
#ifdef Q_WS_X11 #ifdef Q_WS_X11
m_Desk = KWin::windowInfo(m_pWidget->topLevelWidget()->winId()).desktop(); 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(); m_Desk = currentDesktop();
}
// KSharedPixmap will correctly generate a tile for us. // KSharedPixmap will correctly generate a tile for us.
m_pPixmap->loadFromShared(pixmapName(m_Desk), m_Rect); m_pPixmap->loadFromShared(pixmapName(m_Desk), m_Rect);

Loading…
Cancel
Save