Magnifier requires OpenGL

This commit is contained in:
Martin Gräßlin 2011-06-26 18:51:08 +02:00
parent 163824af85
commit 482ba893d5
2 changed files with 7 additions and 0 deletions

View file

@ -34,6 +34,7 @@ namespace KWin
{ {
KWIN_EFFECT(magnifier, MagnifierEffect) KWIN_EFFECT(magnifier, MagnifierEffect)
KWIN_EFFECT_SUPPORTED(magnifier, MagnifierEffect::supported())
const int FRAME_WIDTH = 5; const int FRAME_WIDTH = 5;
@ -55,6 +56,11 @@ MagnifierEffect::MagnifierEffect()
reconfigure(ReconfigureAll); reconfigure(ReconfigureAll);
} }
bool MagnifierEffect::supported()
{
return effects->compositingType() == OpenGLCompositing;
}
void MagnifierEffect::reconfigure(ReconfigureFlags) void MagnifierEffect::reconfigure(ReconfigureFlags)
{ {
KConfigGroup conf = EffectsHandler::effectConfig("Magnifier"); KConfigGroup conf = EffectsHandler::effectConfig("Magnifier");

View file

@ -36,6 +36,7 @@ public:
virtual void prePaintScreen(ScreenPrePaintData& data, int time); virtual void prePaintScreen(ScreenPrePaintData& data, int time);
virtual void paintScreen(int mask, QRegion region, ScreenPaintData& data); virtual void paintScreen(int mask, QRegion region, ScreenPaintData& data);
virtual void postPaintScreen(); virtual void postPaintScreen();
static bool supported();
private slots: private slots:
void zoomIn(); void zoomIn();
void zoomOut(); void zoomOut();