avoid dbus deadlocks
use more consistent names too svn path=/trunk/KDE/kdebase/workspace/; revision=1194388
This commit is contained in:
parent
06aceca5ed
commit
aa804ee8c8
3 changed files with 14 additions and 7 deletions
|
@ -73,10 +73,10 @@
|
|||
<method name="nextTileLayout"/>
|
||||
<method name="previousTileLayout"/>
|
||||
<method name="dumpTiles"/>
|
||||
<method name="storeActivity">
|
||||
<method name="stopActivity">
|
||||
<arg type="s" direction="in"/>
|
||||
</method>
|
||||
<method name="loadActivity">
|
||||
<method name="startActivity">
|
||||
<arg type="s" direction="in"/>
|
||||
</method>
|
||||
</interface>
|
||||
|
|
12
sm.cpp
12
sm.cpp
|
@ -204,9 +204,15 @@ void Workspace::storeSubSession(const QString &name, QSet<QByteArray> sessionIds
|
|||
//cg.writeEntry( "desktop", currentDesktop());
|
||||
}
|
||||
|
||||
void Workspace::storeActivity(const QString &id)
|
||||
void Workspace::stopActivity(const QString &id)
|
||||
{
|
||||
QStringList openActivities = openActivityList(); //FIXME please don't deadlock
|
||||
//ugly hack to avoid dbus deadlocks
|
||||
QMetaObject::invokeMethod(this, "reallyStopActivity", Qt::QueuedConnection, Q_ARG(QString, id));
|
||||
}
|
||||
|
||||
void Workspace::reallyStopActivity(const QString &id)
|
||||
{
|
||||
QStringList openActivities = openActivityList();
|
||||
|
||||
QSet<QByteArray> saveSessionIds;
|
||||
QSet<QByteArray> dontCloseSessionIds;
|
||||
|
@ -328,7 +334,7 @@ void Workspace::loadSubSessionInfo(const QString &name)
|
|||
addSessionInfo(cg);
|
||||
}
|
||||
|
||||
void Workspace::loadActivity(const QString &id)
|
||||
void Workspace::startActivity(const QString &id)
|
||||
{
|
||||
if (!allActivities_.contains(id))
|
||||
return; //bogus id
|
||||
|
|
|
@ -449,8 +449,8 @@ class Workspace : public QObject, public KDecorationDefines
|
|||
void toggleTiling();
|
||||
void nextTileLayout();
|
||||
void previousTileLayout();
|
||||
void storeActivity( const QString &id );
|
||||
void loadActivity( const QString &id );
|
||||
void stopActivity( const QString &id );
|
||||
void startActivity( const QString &id );
|
||||
|
||||
void setCurrentScreen( int new_screen );
|
||||
|
||||
|
@ -769,6 +769,7 @@ class Workspace : public QObject, public KDecorationDefines
|
|||
void updateCurrentActivity(const QString &new_activity);
|
||||
void activityRemoved(const QString &activity);
|
||||
void activityAdded(const QString &activity);
|
||||
void reallyStopActivity( const QString &id ); //dbus deadlocks suck
|
||||
|
||||
protected:
|
||||
bool keyPressMouseEmulation( XKeyEvent& ev );
|
||||
|
|
Loading…
Reference in a new issue