From 482ba893d596cfbd97efda92cac2fc4860d01c66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sun, 26 Jun 2011 18:51:08 +0200 Subject: [PATCH] Magnifier requires OpenGL --- effects/magnifier/magnifier.cpp | 6 ++++++ effects/magnifier/magnifier.h | 1 + 2 files changed, 7 insertions(+) diff --git a/effects/magnifier/magnifier.cpp b/effects/magnifier/magnifier.cpp index 74e0d8ea0e..5fea59c10d 100644 --- a/effects/magnifier/magnifier.cpp +++ b/effects/magnifier/magnifier.cpp @@ -34,6 +34,7 @@ namespace KWin { KWIN_EFFECT(magnifier, MagnifierEffect) +KWIN_EFFECT_SUPPORTED(magnifier, MagnifierEffect::supported()) const int FRAME_WIDTH = 5; @@ -55,6 +56,11 @@ MagnifierEffect::MagnifierEffect() reconfigure(ReconfigureAll); } +bool MagnifierEffect::supported() +{ + return effects->compositingType() == OpenGLCompositing; +} + void MagnifierEffect::reconfigure(ReconfigureFlags) { KConfigGroup conf = EffectsHandler::effectConfig("Magnifier"); diff --git a/effects/magnifier/magnifier.h b/effects/magnifier/magnifier.h index 33d4c73313..0ea3adabae 100644 --- a/effects/magnifier/magnifier.h +++ b/effects/magnifier/magnifier.h @@ -36,6 +36,7 @@ public: virtual void prePaintScreen(ScreenPrePaintData& data, int time); virtual void paintScreen(int mask, QRegion region, ScreenPaintData& data); virtual void postPaintScreen(); + static bool supported(); private slots: void zoomIn(); void zoomOut();