This commit is contained in:
committed by
Git OBS Bridge
parent
f9b70210a8
commit
12cebc449c
39
0002-don-t-try-to-load-layout-before-kamd-starts.patch
Normal file
39
0002-don-t-try-to-load-layout-before-kamd-starts.patch
Normal file
@@ -0,0 +1,39 @@
|
||||
From f7ef6ee87b8957bebc976b6fc9e0df279cea05f1 Mon Sep 17 00:00:00 2001
|
||||
From: Marco Martin <notmart@gmail.com>
|
||||
Date: Wed, 20 Jul 2016 13:57:08 +0200
|
||||
Subject: [PATCH 02/11] don't try to load layout before kamd starts
|
||||
|
||||
if the status of kamd is anything but running, refuse to
|
||||
execute load()
|
||||
this fixes activity creation in default layout initialization
|
||||
---
|
||||
shell/shellcorona.cpp | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/shell/shellcorona.cpp b/shell/shellcorona.cpp
|
||||
index 93a218addeb965ca421ac593f1ab5373bc344431..8b873aa8a382399b8bfc7ae7c6ff0ba65041d37e 100644
|
||||
--- a/shell/shellcorona.cpp
|
||||
+++ b/shell/shellcorona.cpp
|
||||
@@ -302,7 +302,9 @@ void ShellCorona::setShell(const QString &shell)
|
||||
|
||||
connect(m_activityController, &KActivities::Controller::serviceStatusChanged, this, &ShellCorona::load, Qt::UniqueConnection);
|
||||
|
||||
- load();
|
||||
+ if (m_activityController->serviceStatus() == KActivities::Controller::Running) {
|
||||
+ load();
|
||||
+ }
|
||||
}
|
||||
|
||||
QString ShellCorona::shell() const
|
||||
@@ -330,7 +332,7 @@ static QList<QScreen*> sortOutputs(const QList<QScreen*> &outputs)
|
||||
void ShellCorona::load()
|
||||
{
|
||||
if (m_shell.isEmpty() ||
|
||||
- m_activityController->serviceStatus() == KActivities::Controller::Unknown) {
|
||||
+ m_activityController->serviceStatus() != KActivities::Controller::Running) {
|
||||
return;
|
||||
}
|
||||
|
||||
--
|
||||
2.6.6
|
||||
|
@@ -0,0 +1,74 @@
|
||||
From 5d5f37798e9f3c8ae64a1a69ace6a1f1bae31440 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ivan=20=C4=8Cuki=C4=87?= <ivan.cukic@kde.org>
|
||||
Date: Thu, 21 Jul 2016 23:54:26 +0200
|
||||
Subject: [PATCH 05/11] Missing method for activity deletion from plasma script
|
||||
added
|
||||
|
||||
Summary:
|
||||
We have a method to add an activity in plasma script, but
|
||||
not to remove it. This patch fixes this situation.
|
||||
|
||||
Reviewers: garg, davidedmundson, mart
|
||||
|
||||
Reviewed By: davidedmundson, mart
|
||||
|
||||
Subscribers: plasma-devel
|
||||
|
||||
Tags: #plasma
|
||||
|
||||
Differential Revision: https://phabricator.kde.org/D2251
|
||||
---
|
||||
shell/scripting/scriptengine.cpp | 17 +++++++++++++++++
|
||||
shell/scripting/scriptengine.h | 1 +
|
||||
2 files changed, 18 insertions(+)
|
||||
|
||||
diff --git a/shell/scripting/scriptengine.cpp b/shell/scripting/scriptengine.cpp
|
||||
index b066c6a708ff6b5cc51f54645337c10b70d71227..628e715d6f3cadba8c616d2f819ff28a86d6e1df 100644
|
||||
--- a/shell/scripting/scriptengine.cpp
|
||||
+++ b/shell/scripting/scriptengine.cpp
|
||||
@@ -189,6 +189,22 @@ QScriptValue ScriptEngine::desktopForScreen(QScriptContext *context, QScriptEngi
|
||||
return env->wrap(env->m_corona->containmentForScreen(screen));
|
||||
}
|
||||
|
||||
+QScriptValue ScriptEngine::removeActivity(QScriptContext *context, QScriptEngine *engine)
|
||||
+{
|
||||
+ if (context->argumentCount() < 0) {
|
||||
+ return context->throwError(i18n("removeActivity required the activity id"));
|
||||
+ }
|
||||
+
|
||||
+ const auto id = context->argument(0).toString();
|
||||
+
|
||||
+ KActivities::Controller controller;
|
||||
+ const auto result = controller.removeActivity(id);
|
||||
+
|
||||
+ awaitFuture(result);
|
||||
+
|
||||
+ return QScriptValue();
|
||||
+}
|
||||
+
|
||||
QScriptValue ScriptEngine::createActivity(QScriptContext *context, QScriptEngine *engine)
|
||||
{
|
||||
if (context->argumentCount() < 0) {
|
||||
@@ -818,6 +834,7 @@ void ScriptEngine::setupEngine()
|
||||
|
||||
m_scriptSelf.setProperty(QStringLiteral("QRectF"), constructQRectFClass(this));
|
||||
m_scriptSelf.setProperty(QStringLiteral("createActivity"), newFunction(ScriptEngine::createActivity));
|
||||
+ m_scriptSelf.setProperty(QStringLiteral("removeActivity"), newFunction(ScriptEngine::removeActivity));
|
||||
m_scriptSelf.setProperty(QStringLiteral("setCurrentActivity"), newFunction(ScriptEngine::setCurrentActivity));
|
||||
m_scriptSelf.setProperty(QStringLiteral("currentActivity"), newFunction(ScriptEngine::currentActivity));
|
||||
m_scriptSelf.setProperty(QStringLiteral("activities"), newFunction(ScriptEngine::activities));
|
||||
diff --git a/shell/scripting/scriptengine.h b/shell/scripting/scriptengine.h
|
||||
index 6eae8a1b286429759201f56a11f51c7ea9effc55..944744246d0326ebfd35b5e705fb8073da5b8fbd 100644
|
||||
--- a/shell/scripting/scriptengine.h
|
||||
+++ b/shell/scripting/scriptengine.h
|
||||
@@ -74,6 +74,7 @@ private:
|
||||
static QStringList availableActivities(QScriptContext *context, QScriptEngine *engine);
|
||||
|
||||
static QScriptValue createActivity(QScriptContext *context, QScriptEngine *engine);
|
||||
+ static QScriptValue removeActivity(QScriptContext *context, QScriptEngine *engine);
|
||||
static QScriptValue setCurrentActivity(QScriptContext *context, QScriptEngine *engine);
|
||||
static QScriptValue currentActivity(QScriptContext *controller, QScriptEngine *engine);
|
||||
static QScriptValue activities(QScriptContext *context, QScriptEngine *engine);
|
||||
--
|
||||
2.6.6
|
||||
|
@@ -0,0 +1,27 @@
|
||||
From da5c2fd5058e60d12bfbdfa2b1863433ab20dfbb Mon Sep 17 00:00:00 2001
|
||||
From: Eike Hein <hein@kde.org>
|
||||
Date: Sat, 23 Jul 2016 05:47:51 +0900
|
||||
Subject: [PATCH 06/11] Treat IsDemandingAttention as IsOnAllVirtualDesktops.
|
||||
|
||||
BUG:365970
|
||||
---
|
||||
libtaskmanager/taskfilterproxymodel.cpp | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/libtaskmanager/taskfilterproxymodel.cpp b/libtaskmanager/taskfilterproxymodel.cpp
|
||||
index 79b902e5b7fe9d2c975405b88c60a747f1385685..803db2199417a979916bd267536a9e1f67db603f 100644
|
||||
--- a/libtaskmanager/taskfilterproxymodel.cpp
|
||||
+++ b/libtaskmanager/taskfilterproxymodel.cpp
|
||||
@@ -288,7 +288,8 @@ bool TaskFilterProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &so
|
||||
|
||||
// Filter by virtual desktop.
|
||||
if (d->filterByVirtualDesktop && d->virtualDesktop != 0) {
|
||||
- if (!sourceIdx.data(AbstractTasksModel::IsOnAllVirtualDesktops).toBool()) {
|
||||
+ if (!sourceIdx.data(AbstractTasksModel::IsOnAllVirtualDesktops).toBool()
|
||||
+ && !sourceIdx.data(AbstractTasksModel::IsDemandingAttention).toBool()) {
|
||||
const QVariant &virtualDesktop = sourceIdx.data(AbstractTasksModel::VirtualDesktop);
|
||||
|
||||
if (!virtualDesktop.isNull()) {
|
||||
--
|
||||
2.6.6
|
||||
|
27
0007-apparently-containment-can-be-null.patch
Normal file
27
0007-apparently-containment-can-be-null.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
From 214443fdff330629104509de9e1738aadcfe36b6 Mon Sep 17 00:00:00 2001
|
||||
From: Marco Martin <notmart@gmail.com>
|
||||
Date: Mon, 25 Jul 2016 10:16:03 +0200
|
||||
Subject: [PATCH 07/11] apparently containment() can be null
|
||||
|
||||
null in some rare occasions during startup
|
||||
CCBUG:365989
|
||||
---
|
||||
shell/desktopview.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/shell/desktopview.cpp b/shell/desktopview.cpp
|
||||
index 509184dc4ae77014800517ecea076f5faee2ebdd..83866dc77ab394b7c8f91d5a1016669b29abb5c3 100644
|
||||
--- a/shell/desktopview.cpp
|
||||
+++ b/shell/desktopview.cpp
|
||||
@@ -193,7 +193,7 @@ bool DesktopView::event(QEvent *e)
|
||||
} else if (e->type() == QEvent::FocusIn) { //FIXME: this should *not* be needed
|
||||
ensureWindowType();
|
||||
|
||||
- } else if (e->type() == QEvent::FocusOut) {
|
||||
+ } else if (e->type() == QEvent::FocusOut && containment()) {
|
||||
QObject *graphicObject = containment()->property("_plasma_graphicObject").value<QObject *>();
|
||||
if (graphicObject) {
|
||||
graphicObject->setProperty("focus", false);
|
||||
--
|
||||
2.6.6
|
||||
|
@@ -0,0 +1,52 @@
|
||||
From 475bed7373142afe20927acbc465f269cfa59878 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ivan=20=C4=8Cuki=C4=87?= <ivan.cukic@kde.org>
|
||||
Date: Mon, 25 Jul 2016 22:48:13 +0200
|
||||
Subject: [PATCH 10/11] Properly registering existing activities before loading
|
||||
layout.js
|
||||
|
||||
Reviewers: #plasma, mart, davidedmundson
|
||||
|
||||
Subscribers: plasma-devel
|
||||
|
||||
Tags: #plasma
|
||||
|
||||
Differential Revision: https://phabricator.kde.org/D2288
|
||||
---
|
||||
shell/shellcorona.cpp | 13 +++++++++++++
|
||||
1 file changed, 13 insertions(+)
|
||||
|
||||
diff --git a/shell/shellcorona.cpp b/shell/shellcorona.cpp
|
||||
index 757b32c0a8fd44a6427594ab752d74a802867f35..c993eec300e0eb5a375449c0fe35e6d4c548ce35 100644
|
||||
--- a/shell/shellcorona.cpp
|
||||
+++ b/shell/shellcorona.cpp
|
||||
@@ -345,7 +345,12 @@ void ShellCorona::load()
|
||||
loadLayout("plasma-" + m_shell + "-appletsrc");
|
||||
|
||||
checkActivities();
|
||||
+
|
||||
if (containments().isEmpty()) {
|
||||
+ // Seems like we never really get to this point since loadLayout already
|
||||
+ // (virtually) calls loadDefaultLayout if it does not load anything
|
||||
+ // from the config file. Maybe if the config file is not empty,
|
||||
+ // but still does not have any containments
|
||||
loadDefaultLayout();
|
||||
processUpdateScripts();
|
||||
} else {
|
||||
@@ -575,6 +580,14 @@ void ShellCorona::loadDefaultLayout()
|
||||
QString code = file.readAll();
|
||||
qDebug() << "evaluating startup script:" << script;
|
||||
|
||||
+ // We need to know which activities are here in order for
|
||||
+ // the scripting engine to work. activityAdded does not mind
|
||||
+ // if we pass it the same activity multiple times
|
||||
+ QStringList existingActivities = m_activityController->activities();
|
||||
+ foreach (const QString &id, existingActivities) {
|
||||
+ activityAdded(id);
|
||||
+ }
|
||||
+
|
||||
WorkspaceScripting::ScriptEngine scriptEngine(this);
|
||||
|
||||
connect(&scriptEngine, &WorkspaceScripting::ScriptEngine::printError, this,
|
||||
--
|
||||
2.6.6
|
||||
|
@@ -1,3 +1,13 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 28 20:33:35 UTC 2016 - hrvoje.senjan@gmail.com
|
||||
|
||||
- Added patches from upstream:
|
||||
0002-don-t-try-to-load-layout-before-kamd-starts.patch
|
||||
0005-Missing-method-for-activity-deletion-from-plasma-scr.patch
|
||||
0006-Treat-IsDemandingAttention-as-IsOnAllVirtualDesktops.patch
|
||||
0007-apparently-containment-can-be-null.patch
|
||||
0010-Properly-registering-existing-activities-before-load.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 20 08:54:41 UTC 2016 - hrvoje.senjan@gmail.com
|
||||
|
||||
|
@@ -34,6 +34,11 @@ Patch1: require-qt56.diff
|
||||
# PATCH-FIX-OPENSUSE plasmashell-disable-windowclosing-on-logout.patch kde#349805 wbauer@tmo.at -- Prevent plasma from closing too early on logout resulting in an unusable desktop if the logout is cancelled
|
||||
Patch4: plasmashell-disable-windowclosing-on-logout.patch
|
||||
# PATCHES 100-200 and above are from upstream 5.7 branch
|
||||
Patch100: 0002-don-t-try-to-load-layout-before-kamd-starts.patch
|
||||
Patch101: 0005-Missing-method-for-activity-deletion-from-plasma-scr.patch
|
||||
Patch102: 0006-Treat-IsDemandingAttention-as-IsOnAllVirtualDesktops.patch
|
||||
Patch103: 0007-apparently-containment-can-be-null.patch
|
||||
Patch104: 0010-Properly-registering-existing-activities-before-load.patch
|
||||
# PATCHES 201-300 and above are from upstream master/5.8 branch
|
||||
# PATCH-FEATURE-UPSTREAM Configuration-option-for-System-Tray-icon-size.patch
|
||||
Patch201: Configuration-option-for-System-Tray-icon-size.patch
|
||||
@@ -215,6 +220,11 @@ workspace. Development files.
|
||||
%if 0%{?is_opensuse} || 0%{?suse_version} > 1315
|
||||
%patch4 -p1
|
||||
%endif
|
||||
%patch100 -p1
|
||||
%patch101 -p1
|
||||
%patch102 -p1
|
||||
%patch103 -p1
|
||||
%patch104 -p1
|
||||
%patch201 -p1
|
||||
|
||||
%build
|
||||
|
Reference in New Issue
Block a user