Backport r987422: Added dbus call to get whether kwin compositing is enabled or not, rather than
systematically returning false. This enables nicer painting of decoration previews. svn path=/branches/KDE/4.3/kdebase/workspace/; revision=987424
This commit is contained in:
parent
3d54acecf2
commit
d26e3a64c4
1 changed files with 16 additions and 1 deletions
|
@ -23,6 +23,8 @@
|
|||
#include <klocale.h>
|
||||
#include <kconfig.h>
|
||||
#include <kglobal.h>
|
||||
#include <QDBusMessage>
|
||||
#include <QDBusConnection>
|
||||
#include <QLabel>
|
||||
#include <QStyle>
|
||||
//Added by qt3to4:
|
||||
|
@ -440,7 +442,20 @@ void KDecorationPreviewBridge::grabXServer( bool )
|
|||
|
||||
bool KDecorationPreviewBridge::compositingActive() const
|
||||
{
|
||||
return false;
|
||||
|
||||
QDBusMessage message = QDBusMessage::createMethodCall( "org.kde.kwin", "/KWin", "org.kde.KWin", "compositingActive" );
|
||||
QDBusMessage reply = QDBusConnection::sessionBus().call( message );
|
||||
if( reply.type() != QDBusMessage::ReplyMessage )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
if( reply.arguments().empty() ) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return reply.arguments()[0].toBool();
|
||||
|
||||
}
|
||||
|
||||
KDecorationPreviewOptions::KDecorationPreviewOptions()
|
||||
|
|
Loading…
Reference in a new issue