make glide effect respect the _KDE_SLIDE property
BUG: 287067
This commit is contained in:
parent
19bb897c5b
commit
6ba2d30274
2 changed files with 11 additions and 0 deletions
|
@ -34,15 +34,23 @@ KWIN_EFFECT(glide, GlideEffect)
|
|||
KWIN_EFFECT_SUPPORTED(glide, GlideEffect::supported())
|
||||
|
||||
static const int IsGlideWindow = 0x22A982D4;
|
||||
static Atom slideAtom;
|
||||
|
||||
GlideEffect::GlideEffect()
|
||||
{
|
||||
slideAtom = XInternAtom( display(), "_KDE_SLIDE", False );
|
||||
effects->registerPropertyType( slideAtom, true );
|
||||
reconfigure(ReconfigureAll);
|
||||
connect(effects, SIGNAL(windowAdded(EffectWindow*)), this, SLOT(slotWindowAdded(EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowClosed(EffectWindow*)), this, SLOT(slotWindowClosed(EffectWindow*)));
|
||||
connect(effects, SIGNAL(windowDeleted(EffectWindow*)), this, SLOT(slotWindowDeleted(EffectWindow*)));
|
||||
}
|
||||
|
||||
GlideEffect::~GlideEffect()
|
||||
{
|
||||
effects->registerPropertyType( slideAtom, false );
|
||||
}
|
||||
|
||||
bool GlideEffect::supported()
|
||||
{
|
||||
return effects->compositingType() == OpenGLCompositing;
|
||||
|
@ -217,6 +225,8 @@ bool GlideEffect::isGlideWindow(EffectWindow* w)
|
|||
return false;
|
||||
if (w->data(IsGlideWindow).toBool())
|
||||
return true;
|
||||
if (!w->readProperty( slideAtom, slideAtom, 32 ).isNull())
|
||||
return false;
|
||||
if (w->hasDecoration())
|
||||
return true;
|
||||
if (!w->isManaged() || w->isMenu() || w->isNotification() || w->isDesktop() ||
|
||||
|
|
|
@ -36,6 +36,7 @@ class GlideEffect
|
|||
Q_OBJECT
|
||||
public:
|
||||
GlideEffect();
|
||||
~GlideEffect();
|
||||
virtual void reconfigure(ReconfigureFlags);
|
||||
virtual void prePaintScreen(ScreenPrePaintData& data, int time);
|
||||
virtual void prePaintWindow(EffectWindow* w, WindowPrePaintData& data, int time);
|
||||
|
|
Loading…
Reference in a new issue