From kde-commits Tue Sep 30 22:14:28 2003 From: =?utf-8?q?Richard=20J=2E=20Moore?= Date: Tue, 30 Sep 2003 22:14:28 +0000 To: kde-commits Subject: kdelibs/kdeui X-MARC-Message: https://marc.info/?l=kde-commits&m=106496060130991 CVS commit by rich: KRootPixmap had a bug in that it didn't update the background when the user changed desktops. This patch forces a repaint whenever the current desktop changes which solves the problem. M +9 -1 krootpixmap.cpp 1.23 M +3 -2 krootpixmap.h 1.27 --- kdelibs/kdeui/krootpixmap.cpp #1.22:1.23 @@ -32,4 +32,5 @@ class KRootPixmapData public: QWidget *toplevel; + KWinModule *kwin; }; @@ -61,4 +62,7 @@ void KRootPixmap::init() connect(m_pTimer, SIGNAL(timeout()), SLOT(repaint())); + d->kwin = new KWinModule( this ); + connect( d->kwin, SIGNAL(currentDesktopChanged(int)), SLOT(desktopChanged(int)) ); + d->toplevel = m_pWidget->topLevelWidget(); d->toplevel->installEventFilter(this); @@ -154,4 +158,8 @@ bool KRootPixmap::eventFilter(QObject *, } +void KRootPixmap::desktopChanged( int desk ) +{ + repaint(true); +} void KRootPixmap::repaint() --- kdelibs/kdeui/krootpixmap.h #1.26:1.27 @@ -193,4 +193,5 @@ private slots: void slotBackgroundChanged(int); void slotDone(bool); + void desktopChanged( int desk ); private: