diff --git a/KWinInterface.h b/KWinInterface.h index 10b04c0186..d368ec3685 100644 --- a/KWinInterface.h +++ b/KWinInterface.h @@ -25,11 +25,15 @@ class KWinInterface : virtual public DCOPObject // kompmgr stuff virtual void startKompmgr() = 0; virtual void stopKompmgr() = 0; + virtual bool kompmgrIsRunning() = 0; virtual void setOpacity(unsigned long winId, unsigned int opacityPercent) = 0; virtual void setShadowSize(unsigned long winId, unsigned int shadowSizePercent) = 0; virtual void setUnshadowed(unsigned long winId) = 0; k_dcop_signals: + + virtual void kompmgrStarted() = 0; + virtual void kompmgrStopped() = 0; // never emitted virtual void dcopResetAllClients(); diff --git a/workspace.cpp b/workspace.cpp index d6ad6d4792..3d9ed8c340 100644 --- a/workspace.cpp +++ b/workspace.cpp @@ -27,6 +27,7 @@ License. See the file "COPYING" for the exact licensing terms. #include #include #include +#include #include "plugins.h" #include "client.h" @@ -2334,6 +2335,10 @@ void Workspace::startKompmgr() options->useTranslucency = TRUE; allowKompmgrRestart = FALSE; QTimer::singleShot( 60000, this, SLOT(unblockKompmgrRestart()) ); + QByteArray ba; + QDataStream arg(ba, IO_WriteOnly); + arg << ""; + kapp->dcopClient()->emitDCOPSignal("default", "kompmgrStarted()", ba); } if (popup){ delete popup; popup = 0L; } // to add/remove opacity slider } @@ -2346,6 +2351,15 @@ void Workspace::stopKompmgr() options->useTranslucency = FALSE; if (popup){ delete popup; popup = 0L; } // to add/remove opacity slider kompmgr->kill(); + QByteArray ba; + QDataStream arg(ba, IO_WriteOnly); + arg << ""; + kapp->dcopClient()->emitDCOPSignal("default", "kompmgrStopped()", ba); +} + +bool Workspace::kompmgrIsRunning() +{ + return kompmgr->isRunning(); } void Workspace::unblockKompmgrRestart() diff --git a/workspace.h b/workspace.h index ec0d502f74..8af4d4e460 100644 --- a/workspace.h +++ b/workspace.h @@ -228,6 +228,7 @@ class Workspace : public QObject, public KWinInterface, public KDecorationDefine void sendTakeActivity( Client* c, Time timestamp, long flags ); // called from Client::takeActivity() void stopKompmgr(); + bool kompmgrIsRunning(); void setOpacity(unsigned long winId, unsigned int opacityPercent); void setShadowSize(unsigned long winId, unsigned int shadowSizePercent); void setUnshadowed(unsigned long winId); // redundant, equals setShadowSize(inId, 0) @@ -602,6 +603,10 @@ class Workspace : public QObject, public KWinInterface, public KDecorationDefine int maximizedWindowCounter; int topDockShadowSize;*/ //end + + signals: + void kompmgrStarted(); + void kompmgrStopped(); }; // helper for Workspace::blockStackingUpdates() being called in pairs (true/false)