Splitting up of KWin's global D-Bus interface

Two new interfaces are introduced:
* org.kde.kwin.Compositing
* org.kde.kwin.Effects

The Compositing interface is generated from scriptable elements on the
KWin::Compositor class and the Compositor is exported as /Compositor.
It provides the general Compositing related D-Bus methods like whether
the compositor is active and toggling and so on.

The Effects interface is generated from scriptable elements on the
KWin::EffectsHandlerImpl class and the instance is exported as /Effects.
It provides all the effects related D-Bus methods like loading an effect
or the list of all effects.

This removes the need to have all these methods provided on the global
org.kde.KWin interface. For backwards compatibility they are kept, but
no longer provided by the Workspace class. Instead a new DBusInterface
is generated which wrapps the calls and delegates it to one of our three
related Singleton objects:
* Workspace
* Compositor
* EffectsHandlerImpl
icc-effect-5.14.5
Martin Gräßlin 2012-08-30 08:20:26 +02:00
parent ebbfc26452
commit 35237aadcb
12 changed files with 469 additions and 141 deletions

View File

@ -78,6 +78,7 @@ add_subdirectory( tabbox )
set(kwin_KDEINIT_SRCS
workspace.cpp
dbusinterface.cpp
client.cpp
tabgroup.cpp
placement.cpp
@ -148,7 +149,9 @@ if(KWIN_BUILD_SCREENEDGES)
)
endif(KWIN_BUILD_SCREENEDGES)
qt4_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.KWin.xml workspace.h KWin::Workspace )
qt4_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.KWin.xml dbusinterface.h KWin::DBusInterface )
qt4_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.kwin.Compositing.xml composite.h KWin::Compositor )
qt4_add_dbus_adaptor( kwin_KDEINIT_SRCS org.kde.kwin.Effects.xml effects.h KWin::EffectsHandlerImpl )
qt4_add_dbus_interface( kwin_KDEINIT_SRCS
${KDEBASE_WORKSPACE_SOURCE_DIR}/ksmserver/org.kde.KSMServerInterface.xml ksmserver_interface)

View File

@ -37,6 +37,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
http://ktown.kde.org/~fredrik/composite_howto.html
*/
#include "composite.h"
#include "compositingadaptor.h"
#include <config-X11.h>
@ -54,7 +56,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "shadow.h"
#include "useractions.h"
#include "compositingprefs.h"
#include "composite.h"
#include "notifications.h"
#include <stdio.h>
@ -64,6 +65,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QMenu>
#include <QTimerEvent>
#include <QDateTime>
#include <QDBusConnection>
#include <kaction.h>
#include <kactioncollection.h>
#include <klocale.h>
@ -105,6 +107,10 @@ Compositor::Compositor(QObject* workspace)
, m_nextFrameDelay(0)
, m_scene(NULL)
{
new CompositingAdaptor(this);
QDBusConnection dbus = QDBusConnection::sessionBus();
dbus.registerObject("/Compositor", this);
dbus.registerService("org.kde.kwin.Compositing");
connect(&unredirectTimer, SIGNAL(timeout()), SLOT(delayedCheckUnredirect()));
connect(&compositeResetTimer, SIGNAL(timeout()), SLOT(restart()));
connect(workspace, SIGNAL(configChanged()), SLOT(slotConfigChanged()));
@ -375,13 +381,6 @@ void Compositor::toggleCompositing()
}
}
QStringList Workspace::activeEffects() const
{
if (effects)
return static_cast< EffectsHandlerImpl* >(effects)->activeEffects();
return QStringList();
}
void Compositor::updateCompositeBlocking()
{
updateCompositeBlocking(NULL);
@ -698,33 +697,30 @@ void Compositor::restartKWin(const QString &reason)
system(cmd);
}
/*****************************************************
* Compositing related D-Bus interface from Workspace
****************************************************/
bool Workspace::compositingPossible() const
bool Compositor::isCompositingPossible() const
{
return CompositingPrefs::compositingPossible();
}
QString Workspace::compositingNotPossibleReason() const
QString Compositor::compositingNotPossibleReason() const
{
return CompositingPrefs::compositingNotPossibleReason();
}
bool Workspace::openGLIsBroken() const
bool Compositor::isOpenGLBroken() const
{
return CompositingPrefs::openGlIsBroken();
}
QString Workspace::compositingType()
QString Compositor::compositingType() const
{
// the returned strings are considered as identifiers and may not be translated
if (!effects) {
if (!hasScene()) {
return "none";
}
if (effects->compositingType() == XRenderCompositing) {
switch (m_scene->compositingType()) {
case XRenderCompositing:
return "xrender";
} else if (effects->compositingType() == OpenGLCompositing) {
case OpenGLCompositing:
#ifdef KWIN_HAVE_OPENGLES
return "gles";
#else
@ -734,10 +730,16 @@ QString Workspace::compositingType()
return "gl1";
}
#endif
case NoCompositing:
default:
return "none";
}
return "none";
}
/*****************************************************
* Workspace
****************************************************/
bool Workspace::compositing() const
{
return m_compositor && m_compositor->hasScene();

View File

@ -25,7 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <QtCore/QObject>
#include <QtCore/QElapsedTimer>
#include <QtCore/QTimer>
#include <QtCore/QElapsedTimer>
#include <QtCore/QBasicTimer>
#include <QRegion>
@ -38,6 +37,34 @@ class Scene;
class Compositor : public QObject {
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", "org.kde.kwin.Compositing")
/**
* @brief Whether the Compositor is active. That is a Scene is present and the Compositor is
* not shutting down itself.
**/
Q_PROPERTY(bool active READ isActive)
/**
* @brief Whether compositing is possible. Mostly means whether the required X extensions
* are available.
**/
Q_PROPERTY(bool compositingPossible READ isCompositingPossible)
/**
* @brief The reason why compositing is not possible. Empty String if compositing is possible.
**/
Q_PROPERTY(QString compositingNotPossibleReason READ compositingNotPossibleReason)
/**
* @brief Whether OpenGL has failed badly in the past (crash) and is considered as broken.
**/
Q_PROPERTY(bool openGLIsBroken READ isOpenGLBroken)
/**
* The type of the currently used Scene:
* @li @c none No Compositing
* @li @c xrender XRender
* @li @c gl1 OpenGL 1
* @li @c gl2 OpenGL 2
* @li @c gles OpenGL ES 2
**/
Q_PROPERTY(QString compositingType READ compositingType)
public:
~Compositor();
// when adding repaints caused by a window, you probably want to use
@ -45,11 +72,6 @@ public:
void addRepaint(const QRect& r);
void addRepaint(const QRegion& r);
void addRepaint(int x, int y, int w, int h);
/**
* Called from the D-Bus interface. Does the same as slotToggleCompositing with the
* addition to show a notification on how to revert the compositing state.
**/
void toggleCompositing();
// Mouse polling
void startMousePolling();
void stopMousePolling();
@ -139,8 +161,19 @@ public:
return s_compositor != NULL && s_compositor->isActive();
}
// D-Bus: getters for Properties, see documentation on the property
bool isCompositingPossible() const;
QString compositingNotPossibleReason() const;
bool isOpenGLBroken() const;
QString compositingType() const;
public Q_SLOTS:
void addRepaintFull();
/**
* Called from the D-Bus interface. Does the same as slotToggleCompositing with the
* addition to show a notification on how to revert the compositing state.
**/
Q_SCRIPTABLE void toggleCompositing();
/**
* Actual slot to perform the toggling compositing.
* That is if the Compositor is suspended it will be resumed and if the Compositor is active
@ -163,8 +196,10 @@ public Q_SLOTS:
void updateCompositeBlocking();
void updateCompositeBlocking(KWin::Client* c);
// For the D-Bus interface
Q_SIGNALS:
void compositingToggled(bool active);
Q_SCRIPTABLE void compositingToggled(bool active);
protected:
void timerEvent(QTimerEvent *te);

177
dbusinterface.cpp Normal file
View File

@ -0,0 +1,177 @@
/********************************************************************
KWin - the KDE window manager
This file is part of the KDE project.
Copyright (C) 2012 Martin Gräßlin <mgraesslin@kde.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
// own
#include "dbusinterface.h"
// kwin
#include "composite.h"
#include "effects.h"
#include "kwinadaptor.h"
#include "workspace.h"
namespace KWin
{
DBusInterface::DBusInterface(QObject *parent)
: QObject(parent)
{
(void) new KWinAdaptor(this);
QDBusConnection dbus = QDBusConnection::sessionBus();
dbus.registerObject("/KWin", this);
dbus.registerService("org.kde.KWin");
connect(Compositor::self(), SIGNAL(compositingToggled(bool)), SIGNAL(compositingToggled(bool)));
dbus.connect(QString(), "/KWin", "org.kde.KWin", "reloadConfig",
Workspace::self(), SLOT(slotReloadConfig()));
dbus.connect(QString(), "/KWin", "org.kde.KWin", "reinitCompositing",
Compositor::self(), SLOT(slotReinitialize()));
}
DBusInterface::~DBusInterface()
{
}
// wrap void methods with no arguments to Workspace
#define WRAP(name) \
void DBusInterface::name() \
{\
Workspace::self()->name();\
}
WRAP(cascadeDesktop)
WRAP(circulateDesktopApplications)
WRAP(killWindow)
WRAP(nextDesktop)
WRAP(previousDesktop)
WRAP(reconfigure)
WRAP(unclutterDesktop)
#undef WRAP
// wrap returning methods with no arguments to Workspace
#define WRAP( rettype, name ) \
rettype DBusInterface::name( ) \
{\
return Workspace::self()->name(); \
}
WRAP(int, currentDesktop)
WRAP(QList<int>, decorationSupportedColors)
WRAP(QString, supportInformation)
WRAP(bool, waitForCompositingSetup)
#undef WRAP
// wrap returning methods with one argument to Workspace
#define WRAP( rettype, name, argtype ) \
rettype DBusInterface::name( argtype arg ) \
{\
return Workspace::self()->name(arg); \
}
WRAP(bool, setCurrentDesktop, int)
WRAP(bool, startActivity, const QString &)
WRAP(bool, stopActivity, const QString &)
#undef WRAP
void DBusInterface::doNotManage(const QString &name)
{
Workspace::self()->doNotManage(name);
}
void DBusInterface::showWindowMenuAt(qlonglong winId, int x, int y)
{
Workspace::self()->showWindowMenuAt(winId, x, y);
}
// wrap returning methods with no arguments to COMPOSITOR
#define WRAP( rettype, name ) \
rettype DBusInterface::name( ) \
{\
return Compositor::self()->name(); \
}
WRAP(QString, compositingNotPossibleReason)
WRAP(QString, compositingType)
#undef WRAP
bool DBusInterface::compositingPossible()
{
return Compositor::self()->isCompositingPossible();
}
bool DBusInterface::openGLIsBroken()
{
return Compositor::self()->isOpenGLBroken();
}
bool DBusInterface::compositingActive()
{
return Compositor::self()->isActive();
}
void DBusInterface::toggleCompositing()
{
Compositor::self()->toggleCompositing();
}
// wrap returning QStringList methods with no argument to EffectsHandlerImpl
#define WRAP( name ) \
QStringList DBusInterface::name( ) \
{\
if (effects) { \
return static_cast< EffectsHandlerImpl* >(effects)->name(); \
} \
return QStringList(); \
}
WRAP(activeEffects)
WRAP(listOfEffects)
WRAP(loadedEffects)
#undef WRAP
// wrap void methods with one argument to EffectsHandlerImpl
#define WRAP( name, argtype ) \
void DBusInterface::name( argtype arg ) \
{\
if (effects) { \
static_cast< EffectsHandlerImpl* >(effects)->name(arg); \
} \
}
WRAP(loadEffect, const QString &)
WRAP(reconfigureEffect, const QString &)
WRAP(toggleEffect, const QString &)
WRAP(unloadEffect, const QString &)
#undef WRAP
QString DBusInterface::supportInformationForEffect(const QString &name)
{
if (effects) {
static_cast< EffectsHandlerImpl* >(effects)->supportInformation(name);
}
return QString();
}
} // namespace

151
dbusinterface.h Normal file
View File

@ -0,0 +1,151 @@
/********************************************************************
KWin - the KDE window manager
This file is part of the KDE project.
Copyright (C) 2012 Martin Gräßlin <mgraesslin@kde.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*********************************************************************/
#ifndef KWIN_DBUS_INTERFACE_H
#define KWIN_DBUS_INTERFACE_H
#include <QtCore/QObject>
#include <QtDBus/QtDBus>
class QByteArray;
template<class T> class QList;
template<class Key, class Value> class QMap;
class QString;
class QStringList;
class QVariant;
namespace KWin
{
/**
* @brief This class is a wrapper for the org.kde.KWin D-Bus interface.
*
* The main purpose of this class is to be exported on the D-Bus as object /KWin.
* It is a pure wrapper to provide the deprecated D-Bus methods which have been
* removed from Workspace which used to implement the complete D-Bus interface.
*
* Nowadays the D-Bus interfaces are distributed, parts of it are exported on
* /Compositor, parts on /Effects and parts on /KWin. The implementation in this
* class just delegates the method calls to the actual implementation in one of the
* three singletons.
*
* @author Martin Gräßlin <mgraesslin@kde.org>
* @todo KDE5: remove the methods provided on /Effects and /Compositor
**/
class DBusInterface: public QObject
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", "org.kde.KWin")
public:
DBusInterface(QObject *parent);
virtual ~DBusInterface();
public: // PROPERTIES
public Q_SLOTS: // METHODS
Q_NOREPLY void cascadeDesktop();
void circulateDesktopApplications();
int currentDesktop();
QList<int> decorationSupportedColors();
void doNotManage(const QString &name);
Q_NOREPLY void killWindow();
void nextDesktop();
void previousDesktop();
Q_NOREPLY void reconfigure();
bool setCurrentDesktop(int desktop);
/**
* @deprecated
**/
void showWindowMenuAt(qlonglong winId, int x, int y);
bool startActivity(const QString &in0);
bool stopActivity(const QString &in0);
QString supportInformation();
Q_NOREPLY void unclutterDesktop();
// from compositor
/**
* @deprecated
**/
bool compositingActive();
/**
* @deprecated
**/
QString compositingNotPossibleReason();
/**
* @deprecated
**/
bool compositingPossible();
/**
* @deprecated
**/
QString compositingType();
/**
* @deprecated
**/
bool openGLIsBroken();
/**
* @deprecated
**/
Q_NOREPLY void toggleCompositing();
/**
* @deprecated
**/
bool waitForCompositingSetup();
// from effectshandler
/**
* @deprecated
**/
QStringList activeEffects();
/**
* @deprecated
**/
QStringList listOfEffects();
/**
* @deprecated
**/
void loadEffect(const QString &name);
/**
* @deprecated
**/
QStringList loadedEffects();
/**
* @deprecated
**/
void reconfigureEffect(const QString &name);
/**
* @deprecated
**/
QString supportInformationForEffect(const QString &name);
/**
* @deprecated
**/
void toggleEffect(const QString &name);
/**
* @deprecated
**/
void unloadEffect(const QString &name);
Q_SIGNALS: // SIGNALS
/**
* @deprecated
**/
void compositingToggled(bool active);
};
} // namespace
#endif // KWIN_DBUS_INTERFACE_H

View File

@ -21,6 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "effects.h"
#include "effectsadaptor.h"
#include "deleted.h"
#include "client.h"
#include "group.h"
@ -105,6 +106,10 @@ EffectsHandlerImpl::EffectsHandlerImpl(Compositor *compositor, Scene *scene)
, m_compositor(compositor)
, m_scene(scene)
{
new EffectsAdaptor(this);
QDBusConnection dbus = QDBusConnection::sessionBus();
dbus.registerObject("/Effects", this);
dbus.registerService("org.kde.kwin.Effects");
// init is important, otherwise causes crashes when quads are build before the first painting pass start
m_currentBuildQuadsIterator = m_activeEffects.end();

View File

@ -47,6 +47,10 @@ class Unmanaged;
class EffectsHandlerImpl : public EffectsHandler
{
Q_OBJECT
Q_CLASSINFO("D-Bus Interface", "org.kde.kwin.Effects")
Q_PROPERTY(QStringList activeEffects READ activeEffects)
Q_PROPERTY(QStringList loadedEffects READ loadedEffects)
Q_PROPERTY(QStringList listOfEffects READ listOfEffects)
public:
EffectsHandlerImpl(Compositor *compositor, Scene *scene);
virtual ~EffectsHandlerImpl();
@ -164,12 +168,6 @@ public:
void desktopResized(const QSize &size);
virtual void reloadEffect(Effect *effect);
bool loadEffect(const QString& name, bool checkDefault = false);
void toggleEffect(const QString& name);
void unloadEffect(const QString& name);
void reconfigureEffect(const QString& name);
bool isEffectLoaded(const QString& name) const;
QString supportInformation(const QString& name) const;
QStringList loadedEffects() const;
QStringList listOfEffects() const;
@ -183,6 +181,14 @@ public Q_SLOTS:
void slotShowOutline(const QRect &geometry);
void slotHideOutline();
// slots for D-Bus interface
Q_SCRIPTABLE void reconfigureEffect(const QString& name);
Q_SCRIPTABLE bool loadEffect(const QString& name, bool checkDefault = false);
Q_SCRIPTABLE void toggleEffect(const QString& name);
Q_SCRIPTABLE void unloadEffect(const QString& name);
Q_SCRIPTABLE bool isEffectLoaded(const QString& name) const;
Q_SCRIPTABLE QString supportInformation(const QString& name) const;
protected Q_SLOTS:
void slotDesktopChanged(int old, KWin::Client *withClient);
void slotClientAdded(KWin::Client *c);

View File

@ -0,0 +1,15 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.kde.kwin.Compositing">
<property name="active" type="b" access="read"/>
<property name="compositingPossible" type="b" access="read"/>
<property name="compositingNotPossibleReason" type="s" access="read"/>
<property name="openGLIsBroken" type="b" access="read"/>
<property name="compositingType" type="s" access="read"/>
<signal name="compositingToggled">
<arg name="active" type="b" direction="out"/>
</signal>
<method name="toggleCompositing">
</method>
</interface>
</node>

34
org.kde.kwin.Effects.xml Normal file
View File

@ -0,0 +1,34 @@
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd">
<node>
<interface name="org.kde.kwin.Effects">
<property name="activeEffects" type="as" access="read"/>
<property name="loadedEffects" type="as" access="read"/>
<property name="listOfEffects" type="as" access="read"/>
<method name="reconfigureEffect">
<arg name="name" type="s" direction="in"/>
</method>
<method name="loadEffect">
<arg type="b" direction="out"/>
<arg name="name" type="s" direction="in"/>
<arg name="checkDefault" type="b" direction="in"/>
</method>
<method name="loadEffect">
<arg type="b" direction="out"/>
<arg name="name" type="s" direction="in"/>
</method>
<method name="toggleEffect">
<arg name="name" type="s" direction="in"/>
</method>
<method name="unloadEffect">
<arg name="name" type="s" direction="in"/>
</method>
<method name="isEffectLoaded">
<arg type="b" direction="out"/>
<arg name="name" type="s" direction="in"/>
</method>
<method name="supportInformation">
<arg type="s" direction="out"/>
<arg name="name" type="s" direction="in"/>
</method>
</interface>
</node>

View File

@ -1200,53 +1200,6 @@ void Workspace::showWindowMenuAt(unsigned long, int, int)
slotWindowOperations();
}
void Workspace::loadEffect(const QString& name)
{
if (effects)
static_cast<EffectsHandlerImpl*>(effects)->loadEffect(name);
}
void Workspace::toggleEffect(const QString& name)
{
if (effects)
static_cast<EffectsHandlerImpl*>(effects)->toggleEffect(name);
}
void Workspace::unloadEffect(const QString& name)
{
if (effects)
static_cast<EffectsHandlerImpl*>(effects)->unloadEffect(name);
}
void Workspace::reconfigureEffect(const QString& name)
{
if (effects)
static_cast<EffectsHandlerImpl*>(effects)->reconfigureEffect(name);
}
QStringList Workspace::loadedEffects() const
{
QStringList listModulesLoaded;
if (effects)
listModulesLoaded = static_cast<EffectsHandlerImpl*>(effects)->loadedEffects();
return listModulesLoaded;
}
QStringList Workspace::listOfEffects() const
{
QStringList listModules;
if (effects)
listModules = static_cast<EffectsHandlerImpl*>(effects)->listOfEffects();
return listModules;
}
QString Workspace::supportInformationForEffect(const QString& name) const
{
if (effects)
return static_cast<EffectsHandlerImpl*>(effects)->supportInformation(name);
return QString();
}
void Workspace::slotActivateAttentionWindow()
{
if (attention_chain.count() > 0)

View File

@ -55,7 +55,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "outline.h"
#include "group.h"
#include "rules.h"
#include "kwinadaptor.h"
#include "dbusinterface.h"
#include "unmanaged.h"
#include "deleted.h"
#include "effects.h"
@ -148,13 +148,6 @@ Workspace::Workspace(bool restore)
// If KWin was already running it saved its configuration after loosing the selection -> Reread
QFuture<void> reparseConfigFuture = QtConcurrent::run(options, &Options::reparseConfiguration);
(void) new KWinAdaptor(this);
QDBusConnection dbus = QDBusConnection::sessionBus();
dbus.registerObject("/KWin", this);
dbus.connect(QString(), "/KWin", "org.kde.KWin", "reloadConfig",
this, SLOT(slotReloadConfig()));
// Initialize desktop grid array
desktopGrid_[0] = 0;
desktopGrid_[1] = 0;
@ -207,10 +200,9 @@ Workspace::Workspace(bool restore)
m_compositor = Compositor::createCompositor(this);
connect(this, SIGNAL(currentDesktopChanged(int,KWin::Client*)), m_compositor, SLOT(addRepaintFull()));
connect(m_compositor, SIGNAL(compositingToggled(bool)), SIGNAL(compositingToggled(bool)));
connect(m_compositor, SIGNAL(compositingToggled(bool)), SLOT(slotCompositingToggled()));
dbus.connect(QString(), "/KWin", "org.kde.KWin", "reinitCompositing",
m_compositor, SLOT(slotReinitialize()));
new DBusInterface(this);
// Compatibility
long data = 1;
@ -2210,18 +2202,18 @@ QString Workspace::supportInformation() const
}
support.append("\nLoaded Effects:\n");
support.append( "---------------\n");
foreach (const QString &effect, loadedEffects()) {
foreach (const QString &effect, static_cast<EffectsHandlerImpl*>(effects)->loadedEffects()) {
support.append(effect % '\n');
}
support.append("\nCurrently Active Effects:\n");
support.append( "-------------------------\n");
foreach (const QString &effect, activeEffects()) {
foreach (const QString &effect, static_cast<EffectsHandlerImpl*>(effects)->activeEffects()) {
support.append(effect % '\n');
}
support.append("\nEffect Settings:\n");
support.append( "----------------\n");
foreach (const QString &effect, loadedEffects()) {
support.append(supportInformationForEffect(effect));
foreach (const QString &effect, static_cast<EffectsHandlerImpl*>(effects)->loadedEffects()) {
support.append(static_cast<EffectsHandlerImpl*>(effects)->supportInformation(effect));
support.append('\n');
}
} else {
@ -2239,27 +2231,6 @@ void Workspace::slotCompositingToggled()
}
}
/*
* Called from D-BUS
*/
bool Workspace::compositingActive()
{
if (m_compositor) {
return m_compositor->isActive();
}
return false;
}
/*
* Called from D-BUS
*/
void Workspace::toggleCompositing()
{
if (m_compositor) {
m_compositor->toggleCompositing();
}
}
void Workspace::slotToggleCompositing()
{
if (m_compositor) {

View File

@ -397,15 +397,6 @@ public:
// KDE4 remove me - And it's also in the DCOP interface :(
void showWindowMenuAt(unsigned long id, int x, int y);
void toggleCompositing();
void loadEffect(const QString& name);
void toggleEffect(const QString& name);
void reconfigureEffect(const QString& name);
void unloadEffect(const QString& name);
QString supportInformationForEffect(const QString& name) const;
QStringList loadedEffects() const;
QStringList listOfEffects() const;
/**
@ -455,24 +446,10 @@ public:
void nextDesktop();
void previousDesktop();
void circulateDesktopApplications();
bool compositingActive();
bool waitForCompositingSetup();
bool stopActivity(const QString &id);
bool startActivity(const QString &id);
QStringList activeEffects() const;
QString supportInformation() const;
bool compositingPossible() const;
QString compositingNotPossibleReason() const;
bool openGLIsBroken() const;
/**
* Returns the currently used Compositor (Scene):
* @li @c none No Compositing
* @li @c xrender XRender
* @li @c gl1 OpenGL 1
* @li @c gl2 OpenGL 2
* @li @c gles OpenGL ES 2
**/
QString compositingType();
void setCurrentScreen(int new_screen);
@ -645,7 +622,6 @@ private slots:
void handleActivityReply();
Q_SIGNALS:
Q_SCRIPTABLE void compositingToggled(bool active);
/**
* Emitted after the Workspace has setup the complete initialization process.
* This can be used to connect to for performing post-workspace initialization.