author | Andrea Scarpino
<andrea@archlinux.org> 2011-11-24 16:09:14 UTC |
committer | Andrea Scarpino
<andrea@archlinux.org> 2011-11-24 16:09:14 UTC |
parent | c01937980555c1c6bab8e9935521fda68e7e62c4 |
PKGBUILD | +2 | -2 |
fix-activities.patch | +41 | -29 |
diff --git a/PKGBUILD b/PKGBUILD index bb650ac..b20b806 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -8,11 +8,11 @@ pkgdesc='API for using and interacting with Activities' url='http://kde.org/' license=('GPL' 'FDL') depends=('kdelibs') -makedepends=('cmake') +makedepends=('cmake' 'automoc4') source=("http://download.kde.org/unstable/${pkgver}/src/${pkgname}-${pkgver}.tar.bz2" 'fix-activities.patch') sha1sums=('c619c5d6e3e2ef79d0cebf52bf18d1b467dc24f9' - 'f4246660c4d81da0b70a4a0000cb82af96e18a11') + '6eb890958726856cf4ddb172acd46ba08f7a5088') build() { cd "${srcdir}"/${pkgname}-${pkgver} diff --git a/fix-activities.patch b/fix-activities.patch index 8c58256..5cf62c4 100644 --- a/fix-activities.patch +++ b/fix-activities.patch @@ -1,15 +1,6 @@ -From: Aaron Seigo <aseigo@kde.org> -Date: Thu, 24 Nov 2011 14:23:17 +0000 -Subject: don't check for the session manager in the activity daemon since it is really kwin that matters for those calls -X-Git-Url: http://quickgit.kde.org/?p=kactivities.git&a=commitdiff&h=ec871bb18db2652049ae88dcfc439fa714b80f81 ---- -don't check for the session manager in the activity daemon since it is really kwin that matters for those calls ---- - - ---- a/service/ActivityManager.cpp -+++ b/service/ActivityManager.cpp -@@ -75,15 +75,14 @@ ActivityManagerPrivate::ActivityManagerP +--- kactivities-4.7.80/service/ActivityManager.cpp~ 2011-11-24 16:05:52.777981854 +0000 ++++ kactivities-4.7.80/service/ActivityManager.cpp 2011-11-24 16:06:32.721637122 +0000 +@@ -75,14 +75,14 @@ QHash < WId, SharedInfo::WindowData > & _windows, QHash < KUrl, SharedInfo::ResourceData > & _resources ) @@ -24,31 +15,46 @@ don't check for the session manager in the activity daemon since it is really kw - m_nepomukInitCalled(false), + m_nepomukInitCalled(false), #endif -- q(parent), -- ksmserverInterface(0) +- q(parent) + q(parent), + ksmserverInterface(0) { // Initializing config connect(&configSyncTimer, SIGNAL(timeout()), -@@ -128,13 +127,14 @@ void ActivityManagerPrivate::sessionServ - { - delete ksmserverInterface; +@@ -116,20 +116,26 @@ + this, SLOT(activeWindowChanged(WId))); + + //listen to ksmserver for starting/stopping ++ QDBusServiceWatcher *watcher = new QDBusServiceWatcher("org.kde.ksmserver", ++ QDBusConnection::sessionBus(), ++ QDBusServiceWatcher::WatchForRegistration); ++ connect(watcher, SIGNAL(serviceRegistered(QString)), this, SLOT(sessionServiceRegistered())); ++ sessionServiceRegistered(); ++} ++ ++void ActivityManagerPrivate::sessionServiceRegistered() ++{ ++ delete ksmserverInterface; ksmserverInterface = new QDBusInterface("org.kde.ksmserver", "/KSMServer", "org.kde.KSMServerInterface"); -- haveSessions = ksmserverInterface->isValid(); -- if (haveSessions) { -+ if (ksmserverInterface->isValid()) { + if (ksmserverInterface->isValid()) { ksmserverInterface->setParent(this); connect(ksmserverInterface, SIGNAL(subSessionOpened()), this, SLOT(startCompleted())); connect(ksmserverInterface, SIGNAL(subSessionClosed()), this, SLOT(stopCompleted())); connect(ksmserverInterface, SIGNAL(subSessionCloseCanceled()), this, SLOT(stopCancelled())); //spelling fail :) +- haveSessions = true; } else { +- kDebug() << "couldn't connect to ksmserver! session stuff won't work"; +- //note: in theory it's nice to try again later +- //but in practice, ksmserver is either there or it isn't (killing it logs you out) +- //so in this case there's no point. :) +- ksmserverInterface->deleteLater(); + delete ksmserverInterface; -+ ksmserverInterface = 0; - kDebug() << "couldn't connect to ksmserver! session stuff won't work"; + ksmserverInterface = 0; ++ kDebug() << "couldn't connect to ksmserver! session stuff won't work"; } } -@@ -525,26 +525,24 @@ void ActivityManagerPrivate::reallyStart + +@@ -519,26 +525,24 @@ { bool called = false; // start the starting :) @@ -90,7 +96,7 @@ don't check for the session manager in the activity daemon since it is really kw } if (!called) { -@@ -591,25 +589,23 @@ void ActivityManagerPrivate::reallyStopA +@@ -585,25 +589,23 @@ { bool called = false; // start the stopping :) @@ -130,10 +136,9 @@ don't check for the session manager in the activity daemon since it is really kw } if (!called) { - ---- a/service/ActivityManager_p.h -+++ b/service/ActivityManager_p.h -@@ -68,7 +68,6 @@ public: +--- kactivities-4.7.80/service/ActivityManager_p.h~ 2011-11-24 16:06:01.618054620 +0000 ++++ kactivities-4.7.80/service/ActivityManager_p.h 2011-11-24 16:06:32.721637122 +0000 +@@ -68,7 +68,6 @@ //opening/closing activity (ksmserver can only handle one at a time) QString transitioningActivity; @@ -141,4 +146,11 @@ don't check for the session manager in the activity daemon since it is really kw // Configuration QTimer configSyncTimer; - +@@ -106,6 +105,7 @@ + + void backstoreAvailable(); + void syncActivitiesWithNepomuk(); ++ void sessionServiceRegistered(); + + private: + ActivityManager * const q;