Disable logout effect blur by default as some graphics drivers don't
correctly fallback and I have yet to work out a way of accurately detecting support. svn path=/trunk/KDE/kdebase/workspace/; revision=935761
This commit is contained in:
parent
35253bf10a
commit
8ba7586d79
2 changed files with 21 additions and 9 deletions
|
@ -24,6 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
#include "kwinglutils.h"
|
#include "kwinglutils.h"
|
||||||
|
|
||||||
|
#include <kconfiggroup.h>
|
||||||
#include <kdebug.h>
|
#include <kdebug.h>
|
||||||
|
|
||||||
namespace KWin
|
namespace KWin
|
||||||
|
@ -44,11 +45,29 @@ LogoutEffect::LogoutEffect()
|
||||||
XChangeProperty( display(), sel, hack, hack, 8, PropModeReplace, (unsigned char*)&hack, 1 );
|
XChangeProperty( display(), sel, hack, hack, 8, PropModeReplace, (unsigned char*)&hack, 1 );
|
||||||
// the atom is not removed when effect is destroyed, this is temporary anyway
|
// the atom is not removed when effect is destroyed, this is temporary anyway
|
||||||
|
|
||||||
|
reconfigure( ReconfigureAll );
|
||||||
|
}
|
||||||
|
|
||||||
|
LogoutEffect::~LogoutEffect()
|
||||||
|
{
|
||||||
|
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
||||||
|
delete blurTexture;
|
||||||
|
delete blurTarget;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void LogoutEffect::reconfigure( ReconfigureFlags )
|
||||||
|
{
|
||||||
|
// Disable blur by default as some drivers don't correctly fallback if they don't
|
||||||
|
// support it and I have yet to work out a way of accurately detecting support.
|
||||||
|
KConfigGroup conf = effects->effectConfig( "Logout" );
|
||||||
|
bool useBlur = conf.readEntry( "UseBlur", false );
|
||||||
|
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
||||||
blurSupported = false;
|
blurSupported = false;
|
||||||
blurTexture = NULL;
|
blurTexture = NULL;
|
||||||
blurTarget = NULL;
|
blurTarget = NULL;
|
||||||
if( effects->compositingType() == OpenGLCompositing && GLTexture::NPOTTextureSupported() )
|
if( effects->compositingType() == OpenGLCompositing && GLTexture::NPOTTextureSupported() && useBlur )
|
||||||
{ // TODO: It seems that it is not possible to create a GLRenderTarget that has
|
{ // TODO: It seems that it is not possible to create a GLRenderTarget that has
|
||||||
// a different size than the display right now. Most likely a KWin core bug.
|
// a different size than the display right now. Most likely a KWin core bug.
|
||||||
// Create texture and render target
|
// Create texture and render target
|
||||||
|
@ -63,14 +82,6 @@ LogoutEffect::LogoutEffect()
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
LogoutEffect::~LogoutEffect()
|
|
||||||
{
|
|
||||||
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
|
|
||||||
delete blurTexture;
|
|
||||||
delete blurTarget;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
void LogoutEffect::prePaintScreen( ScreenPrePaintData& data, int time )
|
void LogoutEffect::prePaintScreen( ScreenPrePaintData& data, int time )
|
||||||
{
|
{
|
||||||
if( logoutWindow != NULL && !logoutWindowClosed )
|
if( logoutWindow != NULL && !logoutWindowClosed )
|
||||||
|
|
|
@ -38,6 +38,7 @@ class LogoutEffect
|
||||||
public:
|
public:
|
||||||
LogoutEffect();
|
LogoutEffect();
|
||||||
~LogoutEffect();
|
~LogoutEffect();
|
||||||
|
virtual void reconfigure( ReconfigureFlags );
|
||||||
virtual void prePaintScreen( ScreenPrePaintData& data, int time );
|
virtual void prePaintScreen( ScreenPrePaintData& data, int time );
|
||||||
virtual void paintScreen( int mask, QRegion region, ScreenPaintData& data );
|
virtual void paintScreen( int mask, QRegion region, ScreenPaintData& data );
|
||||||
virtual void postPaintScreen();
|
virtual void postPaintScreen();
|
||||||
|
|
Loading…
Reference in a new issue