From d3ba02fa42103c4464a6ed000211ec3644eb47ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sat, 22 Jun 2013 16:09:14 +0200 Subject: [PATCH] FallApart effect requires OpenGL It does quad transformations which is only supported in the OpenGL compositor. REVIEW: 111176 --- effects/fallapart/fallapart.cpp | 6 ++++++ effects/fallapart/fallapart.desktop | 1 + effects/fallapart/fallapart.h | 3 +++ 3 files changed, 10 insertions(+) diff --git a/effects/fallapart/fallapart.cpp b/effects/fallapart/fallapart.cpp index 5d460172cf..53d25b1dbd 100644 --- a/effects/fallapart/fallapart.cpp +++ b/effects/fallapart/fallapart.cpp @@ -28,6 +28,12 @@ namespace KWin { KWIN_EFFECT(fallapart, FallApartEffect) +KWIN_EFFECT_SUPPORTED(fallapart, FallApartEffect::supported()) + +bool FallApartEffect::supported() +{ + return effects->isOpenGLCompositing(); +} FallApartEffect::FallApartEffect() { diff --git a/effects/fallapart/fallapart.desktop b/effects/fallapart/fallapart.desktop index 749342f445..c9a5e4aea7 100644 --- a/effects/fallapart/fallapart.desktop +++ b/effects/fallapart/fallapart.desktop @@ -161,3 +161,4 @@ X-KDE-PluginInfo-License=GPL X-KDE-PluginInfo-EnabledByDefault=false X-KDE-Library=kwin4_effect_builtins X-KDE-Ordering=70 +X-KWin-Requires-OpenGL=true diff --git a/effects/fallapart/fallapart.h b/effects/fallapart/fallapart.h index 73786d7e01..6b23c030b0 100644 --- a/effects/fallapart/fallapart.h +++ b/effects/fallapart/fallapart.h @@ -44,6 +44,9 @@ public: int configuredBlockSize() const { return blockSize; } + + static bool supported(); + public Q_SLOTS: void slotWindowClosed(KWin::EffectWindow *c); void slotWindowDeleted(KWin::EffectWindow *w);