Plasma::Theme::windowTranslucencyEnabled() caches the selection owner, should be faster than KWindowsystem::compositingActive() that doesn't

svn path=/trunk/KDE/kdelibs/; revision=1161045
This commit is contained in:
Marco Martin 2010-08-09 14:51:34 +00:00
parent 14f517623f
commit 0fea8dc29f

View File

@ -22,6 +22,8 @@
#include <kwindowsystem.h>
#include "theme.h"
#ifdef Q_WS_X11
#include <X11/Xlib.h>
#include <X11/Xatom.h>
@ -41,7 +43,7 @@ namespace WindowEffects
//FIXME: check if this works for any atom?
bool isEffectAvailable(Effect effect)
{
if (!KWindowSystem::compositingActive()) {
if (!Plasma::Theme::defaultTheme()->windowTranslucencyEnabled()) {
return false;
}
#ifdef Q_WS_X11