[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.4/kdebase/workspace/kwin
From: Lucas Murray <lmurray () undefinedfire ! com>
Date: 2010-01-11 5:13:10
Message-ID: 1263186790.199712.19152.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1072838 by lmurray:
Backport r1072837:
Fix conflicts with sliding popups, fade, fall apart, scale in and
explosion by using EffectWindow::data() instead of proxies.
M +3 -0 effects/explosion/explosion.cpp
M +1 -0 effects/explosion/explosion.desktop
M +0 -1 effects/fade/CMakeLists.txt
M +7 -21 effects/fade/fade.cpp
M +0 -6 effects/fade/fade.h
D effects/fade/fade_proxy.cpp
D effects/fade/fade_proxy.h
M +3 -0 effects/fallapart/fallapart.cpp
M +1 -0 effects/fallapart/fallapart.desktop
M +2 -1 effects/scalein/scalein.cpp
M +5 -14 effects/slidingpopups/slidingpopups.cpp
M +14 -0 lib/kwineffects.h
--- branches/KDE/4.4/kdebase/workspace/kwin/effects/explosion/explosion.cpp #1072837:1072838
@@ -196,6 +196,9 @@
void ExplosionEffect::windowClosed( EffectWindow* c )
{
+ const void* e = c->data( WindowClosedGrabRole ).value<void*>();
+ if( e && e != this )
+ return;
if( c->isOnCurrentDesktop() && !c->isMinimized())
{
mWindows[ c ] = 0; // count up to 1
--- branches/KDE/4.4/kdebase/workspace/kwin/effects/explosion/explosion.desktop #1072837:1072838
@@ -153,3 +153,4 @@
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=false
X-KDE-Library=kwin4_effect_builtins
+X-KDE-Ordering=70
--- branches/KDE/4.4/kdebase/workspace/kwin/effects/fade/CMakeLists.txt #1072837:1072838
@@ -4,7 +4,6 @@
# Source files
set( kwin4_effect_builtins_sources ${kwin4_effect_builtins_sources}
fade/fade.cpp
- fade/fade_proxy.cpp
)
# .desktop files
--- branches/KDE/4.4/kdebase/workspace/kwin/effects/fade/fade.cpp #1072837:1072838
@@ -28,16 +28,10 @@
KWIN_EFFECT( fade, FadeEffect )
FadeEffect::FadeEffect()
- : m_proxy( this )
{
reconfigure( ReconfigureAll );
}
-void* FadeEffect::proxy()
- {
- return &m_proxy;
- }
-
void FadeEffect::reconfigure( ReconfigureFlags )
{
KConfigGroup conf = effects->effectConfig( "Fade" );
@@ -199,26 +193,18 @@
void FadeEffect::windowDeleted( EffectWindow* w )
{
windows.remove( w );
- ignoredWindows.remove( w );
}
-void FadeEffect::setWindowIgnored( EffectWindow* w, bool ignore )
-{
- if (ignore)
- {
- ignoredWindows.insert( w );
- }
- else
- {
- ignoredWindows.remove( w );
- }
-}
-
bool FadeEffect::isFadeWindow( EffectWindow* w )
{
+ void* e;
+ if( w->isDeleted() )
+ e = w->data( WindowClosedGrabRole ).value<void*>();
+ else
+ e = w->data( WindowAddedGrabRole ).value<void*>();
if( w->windowClass() == "ksplashx ksplashx"
- || w->windowClass() == "ksplashsimple ksplashsimple"
- || ignoredWindows.contains( w ) )
+ || w->windowClass() == "ksplashsimple ksplashsimple"
+ || ( e && e != this ))
{ // see login effect
return false;
}
--- branches/KDE/4.4/kdebase/workspace/kwin/effects/fade/fade.h #1072837:1072838
@@ -21,8 +21,6 @@
#ifndef KWIN_FADE_H
#define KWIN_FADE_H
-#include "fade_proxy.h"
-
#include <kwineffects.h>
namespace KWin
@@ -43,18 +41,14 @@
virtual void windowAdded( EffectWindow* c );
virtual void windowClosed( EffectWindow* c );
virtual void windowDeleted( EffectWindow* c );
- virtual void* proxy();
- void setWindowIgnored( EffectWindow* w, bool ignore );
bool isFadeWindow( EffectWindow* w );
private:
class WindowInfo;
QHash< const EffectWindow*, WindowInfo > windows;
- QSet< const EffectWindow* > ignoredWindows;
double fadeInStep, fadeOutStep;
int fadeInTime, fadeOutTime;
bool fadeWindows;
- FadeEffectProxy m_proxy;
};
class FadeEffect::WindowInfo
--- branches/KDE/4.4/kdebase/workspace/kwin/effects/fallapart/fallapart.cpp #1072837:1072838
@@ -142,6 +142,9 @@
{
if ( !isRealWindow( c ) )
return;
+ const void* e = c->data( WindowClosedGrabRole ).value<void*>();
+ if( e && e != this )
+ return;
windows[ c ] = 0;
c->refWindow();
}
--- branches/KDE/4.4/kdebase/workspace/kwin/effects/fallapart/fallapart.desktop #1072837:1072838
@@ -149,3 +149,4 @@
X-KDE-PluginInfo-License=GPL
X-KDE-PluginInfo-EnabledByDefault=false
X-KDE-Library=kwin4_effect_builtins
+X-KDE-Ordering=70
--- branches/KDE/4.4/kdebase/workspace/kwin/effects/scalein/scalein.cpp #1072837:1072838
@@ -61,8 +61,9 @@
bool ScaleInEffect::isScaleWindow( EffectWindow* w )
{
+ const void* e = w->data( WindowAddedGrabRole ).value<void*>();
// TODO: isSpecialWindow is rather generic, maybe tell windowtypes separately?
- if ( w->isPopupMenu() || w->isSpecialWindow() || w->isUtility() )
+ if ( w->isPopupMenu() || w->isSpecialWindow() || w->isUtility() || ( e && e != this ))
return false;
return true;
}
--- branches/KDE/4.4/kdebase/workspace/kwin/effects/slidingpopups/slidingpopups.cpp #1072837:1072838
@@ -20,8 +20,6 @@
#include "slidingpopups.h"
-#include "../fade/fade_proxy.h"
-
#include <kdebug.h>
namespace KWin
@@ -150,11 +148,8 @@
mAppearingWindows[ w ].setProgress( 0.0 );
mAppearingWindows[ w ].setCurveShape( TimeLine::EaseOutCurve );
- //tell fadeto ignore this window
- const FadeEffectProxy* proxy =
- static_cast<const FadeEffectProxy*>( effects->getProxy( "fade" ) );
- if( proxy )
- ((FadeEffectProxy*)proxy)->setWindowIgnored( w, true );
+ // Tell other windowAdded() effects to ignore this window
+ w->setData( WindowAddedGrabRole, QVariant::fromValue( static_cast<void*>( this )));
w->addRepaintFull();
}
@@ -171,6 +166,9 @@
mDisappearingWindows[ w ].setProgress( 0.0 );
mDisappearingWindows[ w ].setCurveShape( TimeLine::EaseOutCurve );
+ // Tell other windowClosed() effects to ignore this window
+ w->setData( WindowClosedGrabRole, QVariant::fromValue( static_cast<void*>( this )));
+
w->addRepaintFull();
}
}
@@ -190,14 +188,7 @@
QByteArray data = w->readProperty( mAtom, mAtom, 32 );
if( data.length() < 1 )
- {
- FadeEffectProxy* proxy =
- static_cast<FadeEffectProxy*>( effects->getProxy( "fade" ) );
- if( proxy )
- proxy->setWindowIgnored(w, false);
-
return;
- }
long* d = reinterpret_cast< long* >( data.data());
Data animData;
--- branches/KDE/4.4/kdebase/workspace/kwin/lib/kwineffects.h #1072837:1072838
@@ -183,6 +183,20 @@
};
/**
+ * EffectWindow::setData() and EffectWindow::data() global roles.
+ * All values between 0 and 999 are reserved for global roles.
+ */
+enum DataRole
+ {
+ // Grab roles are used to force all other animations to ignore the window.
+ // The value of the data is set to the Effect's `this` value.
+ WindowAddedGrabRole = 1,
+ WindowClosedGrabRole,
+ WindowMinimizedGrabRole,
+ WindowUnminimizedGrabRole
+ };
+
+/**
* Infinite region (i.e. a special region type saying that everything needs to be painted).
*/
KWIN_EXPORT inline
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic