diff --git a/effects/resize/resize.cpp b/effects/resize/resize.cpp
index b5c6a65287..a24e1241f7 100644
--- a/effects/resize/resize.cpp
+++ b/effects/resize/resize.cpp
@@ -37,7 +37,8 @@ namespace KWin
KWIN_EFFECT(resize, ResizeEffect)
ResizeEffect::ResizeEffect()
- : m_active(false)
+ : AnimationEffect()
+ , m_active(false)
, m_resizeWindow(0)
{
reconfigure(ReconfigureAll);
@@ -55,14 +56,14 @@ void ResizeEffect::prePaintScreen(ScreenPrePaintData& data, int time)
if (m_active) {
data.mask |= PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS;
}
- effects->prePaintScreen(data, time);
+ AnimationEffect::prePaintScreen(data, time);
}
void ResizeEffect::prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time)
{
if (m_active && w == m_resizeWindow)
data.mask |= PAINT_WINDOW_TRANSFORMED;
- effects->prePaintWindow(w, data, time);
+ AnimationEffect::prePaintWindow(w, data, time);
}
void ResizeEffect::paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data)
@@ -118,8 +119,9 @@ void ResizeEffect::paintWindow(EffectWindow* w, int mask, QRegion region, Window
}
#endif
}
- } else
- effects->paintWindow(w, mask, region, data);
+ } else {
+ AnimationEffect::paintWindow(w, mask, region, data);
+ }
}
void ResizeEffect::reconfigure(ReconfigureFlags)
@@ -148,6 +150,8 @@ void ResizeEffect::slotWindowFinishUserMovedResized(EffectWindow *w)
if (m_active && w == m_resizeWindow) {
m_active = false;
m_resizeWindow = NULL;
+ if (m_features & TextureScale)
+ animate(w, CrossFadePrevious, 0, 150, FPx2(1.0));
effects->addRepaintFull();
}
}
diff --git a/effects/resize/resize.h b/effects/resize/resize.h
index d900ea6adf..5b1610fe06 100644
--- a/effects/resize/resize.h
+++ b/effects/resize/resize.h
@@ -21,13 +21,13 @@ along with this program. If not, see .
#ifndef KWIN_RESIZE_H
#define KWIN_RESIZE_H
-#include
+#include
namespace KWin
{
class ResizeEffect
- : public Effect
+ : public AnimationEffect
{
Q_OBJECT
Q_PROPERTY(bool textureScale READ isTextureScale)
@@ -38,7 +38,7 @@ public:
virtual inline bool provides(Effect::Feature ef) {
return ef == Effect::Resize;
}
- inline bool isActive() const { return m_active; }
+ inline bool isActive() const { return m_active || AnimationEffect::isActive(); }
virtual void prePaintScreen(ScreenPrePaintData& data, int time);
virtual void prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time);
virtual void paintWindow(EffectWindow* w, int mask, QRegion region, WindowPaintData& data);