summaryrefslogtreecommitdiffstats
path: root/kdeui
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-10-11 19:29:25 -0500
committerSlávek Banko <slavek.banko@axis.cz>2012-10-20 17:51:11 +0200
commit4d18026be07791bd9f64dacd76eb0b5362d49c56 (patch)
treed924f0eb58f1977f87d85ebc605026a93b39c2b2 /kdeui
parent154a72147f3f6272458f6e46313907fb77fe6ade (diff)
downloadtdelibs-4d18026be07791bd9f64dacd76eb0b5362d49c56.tar.gz
tdelibs-4d18026be07791bd9f64dacd76eb0b5362d49c56.zip
Fix KRootBacking failure when no window is displayed
This partially resolves Bug 811 (cherry picked from commit 2771be621097ef41405e184507fcf10b8b091ae0)
Diffstat (limited to 'kdeui')
-rw-r--r--kdeui/krootpixmap.cpp3
1 files changed, 2 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);