Do not alter window painted on top of logout window in logout effect. That is don't change saturation and don't blur.
BUG: 192318 svn path=/trunk/KDE/kdebase/workspace/; revision=966573
This commit is contained in:
parent
7157eeda3b
commit
d8178fa8c5
2 changed files with 31 additions and 1 deletions
|
@ -36,6 +36,7 @@ LogoutEffect::LogoutEffect()
|
|||
: progress( 0.0 )
|
||||
, logoutWindow( NULL )
|
||||
, logoutWindowClosed( true )
|
||||
, logoutWindowPassed( false )
|
||||
{
|
||||
char net_wm_cm_name[ 100 ];
|
||||
sprintf( net_wm_cm_name, "_NET_WM_CM_S%d", DefaultScreen( display()));
|
||||
|
@ -111,7 +112,7 @@ void LogoutEffect::paintWindow( EffectWindow* w, int mask, QRegion region, Windo
|
|||
else
|
||||
{
|
||||
#endif
|
||||
if( w != logoutWindow )
|
||||
if( w != logoutWindow && !logoutWindowPassed )
|
||||
{
|
||||
if( effects->saturationSupported() )
|
||||
{
|
||||
|
@ -122,8 +123,19 @@ void LogoutEffect::paintWindow( EffectWindow* w, int mask, QRegion region, Windo
|
|||
data.brightness *= ( 1.0 - progress * 0.6 );
|
||||
}
|
||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
||||
if( blurSupported && logoutWindowPassed )
|
||||
{
|
||||
windows.append( w );
|
||||
windowsOpacities[ w ] = data.opacity;
|
||||
data.opacity = 0.0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if( w == logoutWindow )
|
||||
{
|
||||
// logout window - all following windows are on top and should not be altered
|
||||
logoutWindowPassed = true;
|
||||
}
|
||||
}
|
||||
effects->paintWindow( w, mask, region, data );
|
||||
}
|
||||
|
@ -164,6 +176,18 @@ void LogoutEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data
|
|||
winData.opacity = windowOpacity;
|
||||
effects->drawWindow( logoutWindow, winMask, region, winData );
|
||||
}
|
||||
|
||||
// Render all windows on top of logout window
|
||||
foreach( EffectWindow* w, windows )
|
||||
{
|
||||
int winMask = w->hasAlpha() ? PAINT_WINDOW_TRANSLUCENT : PAINT_WINDOW_OPAQUE;
|
||||
WindowPaintData winData( w );
|
||||
winData.opacity = windowsOpacities[ w ];
|
||||
effects->drawWindow( w, winMask, region, winData );
|
||||
}
|
||||
|
||||
windows.clear();
|
||||
windowsOpacities.clear();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -171,7 +195,10 @@ void LogoutEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data
|
|||
void LogoutEffect::postPaintScreen()
|
||||
{
|
||||
if( progress != 0.0 && progress != 1.0 )
|
||||
{
|
||||
effects->addRepaintFull();
|
||||
logoutWindowPassed = false;
|
||||
}
|
||||
effects->postPaintScreen();
|
||||
}
|
||||
|
||||
|
|
|
@ -51,12 +51,15 @@ class LogoutEffect
|
|||
double progress; // 0-1
|
||||
EffectWindow* logoutWindow;
|
||||
bool logoutWindowClosed;
|
||||
bool logoutWindowPassed;
|
||||
|
||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
||||
bool blurSupported;
|
||||
GLTexture* blurTexture;
|
||||
GLRenderTarget* blurTarget;
|
||||
double windowOpacity;
|
||||
EffectWindowList windows;
|
||||
QHash< EffectWindow*, double > windowsOpacities;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue