From 2e03b7075c54443fee02601b4687e631563b681f0a8c82ec85d465db06df6868 Mon Sep 17 00:00:00 2001 From: Hrvoje Senjan Date: Tue, 1 Mar 2016 21:54:33 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/plasma5-workspace?expand=0&rev=181 --- fix-session-switch.patch | 114 ------------------ ...del-on-list-always-shown-hide-change.patch | 74 ------------ 2 files changed, 188 deletions(-) delete mode 100644 fix-session-switch.patch delete mode 100644 reset-the-model-on-list-always-shown-hide-change.patch diff --git a/fix-session-switch.patch b/fix-session-switch.patch deleted file mode 100644 index bf17f42..0000000 --- a/fix-session-switch.patch +++ /dev/null @@ -1,114 +0,0 @@ -From: Kai Uwe Broulik -Date: Thu, 25 Feb 2016 21:16:22 +0000 -Subject: [User Switcher] Fix session switching when automatic screen locking is enabled -X-Git-Url: http://quickgit.kde.org/?p=plasma-workspace.git&a=commitdiff&h=7a0096ba99d7a71ae9f45d7c0011d0ebb1eae23d ---- -[User Switcher] Fix session switching when automatic screen locking is enabled - -When automatic screen locking is enabled, we want to ensure the screen is fully locked -before we switch sessions or go to the login screen to avoid brief exposure of the desktop -when we return. - -This check happens asynchronously and because the User Switcher dialog closes immediately -after issuing the switch request, the SessionsModel is already destroyed and the reply is never -actually processed. - -BUG: 356945 -FIXED-IN: 5.5.5 - -Differential Revision: https://phabricator.kde.org/D1020 ---- - - ---- a/components/sessionsprivate/sessionsmodel.cpp -+++ b/components/sessionsprivate/sessionsmodel.cpp -@@ -45,8 +45,10 @@ - if (active) { - if (m_pendingVt) { - m_displayManager.switchVT(m_pendingVt); -+ emit switchedUser(m_pendingVt); - } else if (m_pendingReserve) { - m_displayManager.startReserve(); -+ emit startedNewSession(); - } - - m_pendingVt = 0; -@@ -78,6 +80,7 @@ - - if (!shouldLock) { - m_displayManager.switchVT(vt); -+ emit switchedUser(vt); - return; - } - -@@ -85,6 +88,7 @@ - if (locked) { - // already locked, switch right away - m_displayManager.switchVT(vt); -+ emit switchedUser(vt); - } else { - m_pendingReserve = false; - m_pendingVt = vt; -@@ -101,6 +105,7 @@ - - if (!shouldLock) { - m_displayManager.startReserve(); -+ emit startedNewSession(); - return; - } - -@@ -108,6 +113,7 @@ - if (locked) { - // already locked, switch right away - m_displayManager.startReserve(); -+ emit startedNewSession(); - } else { - m_pendingReserve = true; - m_pendingVt = 0; - ---- a/components/sessionsprivate/sessionsmodel.h -+++ b/components/sessionsprivate/sessionsmodel.h -@@ -86,8 +86,10 @@ - - signals: - void shouldLockChanged(); -+ void countChanged(); - -- void countChanged(); -+ void switchedUser(int vt); -+ void startedNewSession(); - - private: - void checkScreenLocked(const std::function &cb); - ---- a/lookandfeel/contents/userswitcher/UserSwitcher.qml -+++ b/lookandfeel/contents/userswitcher/UserSwitcher.qml -@@ -38,6 +38,11 @@ - - SessionsModel { - id: sessionsModel -+ // the calls takes place asynchronously; if we were to dismiss the dialog right -+ // after startNewSession/switchUser we would be destroyed before the reply -+ // returned leaving us do nothing (Bug 356945) -+ onStartedNewSession: root.dismissed() -+ onSwitchedUser: root.dismissed() - } - - Controls.Action { -@@ -125,7 +130,6 @@ - visible: sessionsModel.canStartNewSession - onClicked: { - sessionsModel.startNewSession(sessionsModel.shouldLock) -- root.dismissed() - } - } - -@@ -148,7 +152,6 @@ - visible: sessionsModel.count > 0 - onClicked: { - sessionsModel.switchUser(block.mainItem.selectedItem.vtNumber, sessionsModel.shouldLock) -- root.dismissed() - } - - Controls.Action { - diff --git a/reset-the-model-on-list-always-shown-hide-change.patch b/reset-the-model-on-list-always-shown-hide-change.patch deleted file mode 100644 index 5ad0b68..0000000 --- a/reset-the-model-on-list-always-shown-hide-change.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 42a3d8accd4e494d343954ddaa916a6c618d94f3 Mon Sep 17 00:00:00 2001 -From: Marco Martin -Date: Wed, 3 Feb 2016 15:36:31 +0100 -Subject: [PATCH 1/1] reset the model on list always shown/hide change - -something really wrong is going on on the proxymodel updates -the wrong item gets removed from the list. -it may be a wrong mapping between source and dest model -(doesn't seem so) -or may have been some misguided attempt by QML to recycle delegates - -anyways resetting the model in some conditions even if expensive -seems to be the only way to workaround this. -Anyways this systray implementation is beyond any repair and -the rewritten version won't have to rely on so many models -and proxymodels - -BUG:357627 -CCBUG:352055 ---- - applets/systemtray/plugin/tasksproxymodel.cpp | 13 ++++++++++--- - applets/systemtray/plugin/tasksproxymodel.h | 5 ++++- - 2 files changed, 14 insertions(+), 4 deletions(-) - -diff --git a/applets/systemtray/plugin/tasksproxymodel.cpp b/applets/systemtray/plugin/tasksproxymodel.cpp -index 632e84b..b93b05e 100644 ---- a/applets/systemtray/plugin/tasksproxymodel.cpp -+++ b/applets/systemtray/plugin/tasksproxymodel.cpp -@@ -50,9 +50,9 @@ void TasksProxyModel::setHost(Host *host) - - connect(m_host, &Host::taskStatusChanged, this, &TasksProxyModel::invalidateFilter); - connect(m_host, &Host::shownCategoriesChanged, this, &TasksProxyModel::invalidateFilter); -- connect(m_host, &Host::showAllItemsChanged, this, &TasksProxyModel::invalidateFilter); -- connect(m_host, &Host::forcedHiddenItemsChanged, this, &TasksProxyModel::invalidateFilter); -- connect(m_host, &Host::forcedShownItemsChanged, this, &TasksProxyModel::invalidateFilter); -+ connect(m_host, &Host::showAllItemsChanged, this, &TasksProxyModel::reset); -+ connect(m_host, &Host::forcedHiddenItemsChanged, this, &TasksProxyModel::reset); -+ connect(m_host, &Host::forcedShownItemsChanged, this, &TasksProxyModel::reset); - } - - invalidateFilter(); -@@ -74,6 +74,13 @@ void TasksProxyModel::setCategory(Category category) - } - } - -+void TasksProxyModel::reset() -+{ -+ beginResetModel(); -+ invalidateFilter(); -+ endResetModel(); -+} -+ - bool TasksProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const - { - Q_UNUSED(sourceParent); -diff --git a/applets/systemtray/plugin/tasksproxymodel.h b/applets/systemtray/plugin/tasksproxymodel.h -index 70e723a..5799d62 100644 ---- a/applets/systemtray/plugin/tasksproxymodel.h -+++ b/applets/systemtray/plugin/tasksproxymodel.h -@@ -56,7 +56,10 @@ public: - - virtual bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override; - --signals: -+private Q_SLOTS: -+ void reset(); -+ -+Q_SIGNALS: - void hostChanged(); - void categoryChanged(); - void countChanged(); --- -2.6.2 -