diff --git a/private/effectwatcher.cpp b/private/effectwatcher.cpp index 86d9a65d0..9533fd8eb 100644 --- a/private/effectwatcher.cpp +++ b/private/effectwatcher.cpp @@ -22,8 +22,9 @@ #include #include - +#ifdef Q_WS_X11 #include +#endif namespace Plasma { @@ -34,12 +35,15 @@ EffectWatcher::EffectWatcher(Plasma::WindowEffects::Effect effect, QWidget *pare m_effect(effect), m_effectActive(false) { +#ifdef Q_WS_X11 kapp->installX11EventFilter( this ); Display *dpy = QX11Info::display(); XSelectInput(dpy, RootWindow(dpy, 0), PropertyChangeMask); +#endif } +#ifdef Q_WS_X11 bool EffectWatcher::x11Event(XEvent *event) { bool nowEffectActive = WindowEffects::isEffectAvailable(m_effect); @@ -49,6 +53,7 @@ bool EffectWatcher::x11Event(XEvent *event) } return QWidget::x11Event(event); } +#endif } diff --git a/private/effectwatcher_p.h b/private/effectwatcher_p.h index 931d569e7..c706074f2 100644 --- a/private/effectwatcher_p.h +++ b/private/effectwatcher_p.h @@ -35,7 +35,9 @@ public: EffectWatcher(Plasma::WindowEffects::Effect effect, QWidget *parent = 0); protected: +#ifdef Q_WS_X11 bool x11Event(XEvent *event); +#endif Q_SIGNALS: void blurBehindChanged(bool blur);