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=/trunk/KDE/kdebase/workspace/; revision=987420
This commit is contained in:
parent
031bdd0239
commit
5e783b34b9
1 changed files with 16 additions and 1 deletions
|
@ -23,6 +23,8 @@
|
||||||
#include <klocale.h>
|
#include <klocale.h>
|
||||||
#include <kconfig.h>
|
#include <kconfig.h>
|
||||||
#include <kglobal.h>
|
#include <kglobal.h>
|
||||||
|
#include <QDBusMessage>
|
||||||
|
#include <QDBusConnection>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QStyle>
|
#include <QStyle>
|
||||||
//Added by qt3to4:
|
//Added by qt3to4:
|
||||||
|
@ -439,10 +441,23 @@ void KDecorationPreviewBridge::grabXServer( bool )
|
||||||
}
|
}
|
||||||
|
|
||||||
bool KDecorationPreviewBridge::compositingActive() const
|
bool KDecorationPreviewBridge::compositingActive() const
|
||||||
|
{
|
||||||
|
|
||||||
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( reply.arguments().empty() ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return reply.arguments()[0].toBool();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
KDecorationPreviewOptions::KDecorationPreviewOptions()
|
KDecorationPreviewOptions::KDecorationPreviewOptions()
|
||||||
{
|
{
|
||||||
customBorderSize = BordersCount; // invalid
|
customBorderSize = BordersCount; // invalid
|
||||||
|
|
Loading…
Reference in a new issue