diff --git a/COMPOSITE_TODO b/COMPOSITE_TODO index 4bd706067c..98ef200a85 100644 --- a/COMPOSITE_TODO +++ b/COMPOSITE_TODO @@ -226,3 +226,7 @@ Effects TODO * DimInactive flickers when switching between windows (temporarily no window becomes active) - focus effect (windows waves a little when it gets focus) + ++ shadow ++ - make work with xrender ++ - follow the shape of the window (currently is disabled completely using the hasOwnShadow() hack) diff --git a/NOTES_4_0 b/NOTES_4_0 index f712426608..c7eaa2393a 100644 --- a/NOTES_4_0 +++ b/NOTES_4_0 @@ -28,6 +28,8 @@ Comments - mention how to turn it on - refer to COMPOSITE_HOWTO? +- mention API is unstable, work in progress and whatnot +- hmm, better mention compositing as a whole is still somewhat experimental :) Video diff --git a/effects.cpp b/effects.cpp index ad4695dd7f..4790a52465 100644 --- a/effects.cpp +++ b/effects.cpp @@ -1034,6 +1034,11 @@ QRegion EffectWindowImpl::shape() const return sw ? sw->shape() : geometry(); } +bool EffectWindowImpl::hasOwnShape() const + { + return toplevel->shape(); + } + QSize EffectWindowImpl::size() const { return toplevel->size(); diff --git a/effects.h b/effects.h index fecded05d7..117ae04ab0 100644 --- a/effects.h +++ b/effects.h @@ -189,6 +189,7 @@ class EffectWindowImpl : public EffectWindow virtual int height() const; virtual QRect geometry() const; virtual QRegion shape() const; + virtual bool hasOwnShape() const; virtual QPoint pos() const; virtual QSize size() const; virtual QRect rect() const; diff --git a/effects/shadow.cpp b/effects/shadow.cpp index d3d0928c6d..20e2fa2d73 100644 --- a/effects/shadow.cpp +++ b/effects/shadow.cpp @@ -116,7 +116,7 @@ void ShadowEffect::windowClosed( EffectWindow* c ) bool ShadowEffect::useShadow( EffectWindow* w ) const { - return !w->isDeleted() && !w->isDesktop() && !w->isDock(); + return !w->isDeleted() && !w->isDesktop() && !w->isDock() && !w->hasOwnShape(); } void ShadowEffect::addQuadVertices(QVector& verts, float x1, float y1, float x2, float y2) const diff --git a/lib/kwineffects.h b/lib/kwineffects.h index 8bb82ef31f..36d7b39b43 100644 --- a/lib/kwineffects.h +++ b/lib/kwineffects.h @@ -40,7 +40,7 @@ along with this program. If not, see . #define KWIN_EFFECT_API_MAKE_VERSION( major, minor ) (( major ) << 8 | ( minor )) #define KWIN_EFFECT_API_VERSION_MAJOR 0 -#define KWIN_EFFECT_API_VERSION_MINOR 5 +#define KWIN_EFFECT_API_VERSION_MINOR 6 #define KWIN_EFFECT_API_VERSION KWIN_EFFECT_API_MAKE_VERSION( \ KWIN_EFFECT_API_VERSION_MAJOR, KWIN_EFFECT_API_VERSION_MINOR ) @@ -513,6 +513,8 @@ class KWIN_EXPORT EffectWindow virtual int height() const = 0; virtual QRect geometry() const = 0; virtual QRegion shape() const = 0; + /** @internal Do not use */ + virtual bool hasOwnShape() const = 0; // only for shadow effect, for now virtual QPoint pos() const = 0; virtual QSize size() const = 0; virtual QRect rect() const = 0;