added some dcop functions/signals to support a kompmgr handling kicker applet
svn path=/trunk/kdebase/kwin/; revision=380671
This commit is contained in:
parent
2306f67f6b
commit
dfbb9c362e
3 changed files with 23 additions and 0 deletions
|
@ -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();
|
||||
|
|
|
@ -27,6 +27,7 @@ License. See the file "COPYING" for the exact licensing terms.
|
|||
#include <kmenubar.h>
|
||||
#include <kprocess.h>
|
||||
#include <kglobalaccel.h>
|
||||
#include <dcopclient.h>
|
||||
|
||||
#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()
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue