Fix KRootBacking failure when no window is displayed

This partially resolves Bug 811
(cherry picked from commit 2771be6210)
v3.5.13-sru
Timothy Pearson 12 years ago committed by Slávek Banko
parent 154a72147f
commit 4d18026be0

@ -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);

@ -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 )

Loading…
Cancel
Save