Hello community,

here is the log from the commit of package kdebase4-workspace for 
openSUSE:Factory checked in at 2013-08-19 10:56:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kdebase4-workspace (Old)
 and      /work/SRC/openSUSE:Factory/.kdebase4-workspace.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "kdebase4-workspace"

Changes:
--------
--- /work/SRC/openSUSE:Factory/kdebase4-workspace/kdebase4-workspace.changes    
2013-08-18 22:21:13.000000000 +0200
+++ 
/work/SRC/openSUSE:Factory/.kdebase4-workspace.new/kdebase4-workspace.changes   
    2013-08-19 10:56:25.000000000 +0200
@@ -1,0 +2,9 @@
+Sat Aug 17 21:03:28 UTC 2013 - [email protected]
+
+- Added three patches from upstream 4.11 branch:
+  0001-Add-back-window-ids-to-the-drag-data-payload.patch
+  this e.g. makes dropping tasks on the pager work again (kde#322567),
+  0002-Fix-rare-race-condition-crash.patch (kde#323496) and
+  0003-make-stacking_order-exclusive-during-shutdown.patch (kde#323383)
+
+-------------------------------------------------------------------

New:
----
  0001-Add-back-window-ids-to-the-drag-data-payload.patch
  0002-Fix-rare-race-condition-crash.patch
  0003-make-stacking_order-exclusive-during-shutdown.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ kdebase4-workspace.spec ++++++
--- /var/tmp/diff_new_pack.LW6Hqc/_old  2013-08-19 10:56:28.000000000 +0200
+++ /var/tmp/diff_new_pack.LW6Hqc/_new  2013-08-19 10:56:28.000000000 +0200
@@ -143,6 +143,12 @@
 Patch65:        kdm-backend-session.patch
 # PATCH-FIX-OPENSUSE helper_actions_syspath.patch -- disables 
org.kde.powerdevil.backlighthelper.syspath policy, until bnc#825256 gets 
resolved
 Patch1000:      helper_actions_syspath.patch
+# PATCH-FIX-UPSTREAM 0001-Add-back-window-ids-to-the-drag-data-payload.patch 
-- this e.g. makes dropping tasks on the pager work again (kde#322567)
+Patch2000:      0001-Add-back-window-ids-to-the-drag-data-payload.patch
+# PATCH-FIX-UPSTREAM 0002-Fix-rare-race-condition-crash.patch (kde#323496)
+Patch2001:      0002-Fix-rare-race-condition-crash.patch
+# PATCH-FIX-UPSTREAM 0003-make-stacking_order-exclusive-during-shutdown.patch 
(kde#323383)
+Patch2002:      0003-make-stacking_order-exclusive-during-shutdown.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Requires:       %{name}-branding = %{_kde_branding_version}
 Requires:       %{name}-ksysguardd = %{version}
@@ -359,6 +365,9 @@
 %if 0%{?suse_version} <= 1230
 %patch1000 -p1
 %endif
+%patch2000 -p1
+%patch2001 -p1
+%patch2002 -p1
 cp %{SOURCE3} kwin/effects/cube/data/cubecap.png
 
 %build

++++++ 0001-Add-back-window-ids-to-the-drag-data-payload.patch ++++++
>From e7b8ac8397721f7870ccb2158275afe4a463878f Mon Sep 17 00:00:00 2001
From: Eike Hein <[email protected]>
Date: Wed, 14 Aug 2013 16:24:54 +0200
Subject: [PATCH 1/8] Add back window ids to the drag data payload.

This e.g. makes dropping tasks on the pager work again.

BUG:322567
---
 libs/taskmanager/tasksmodel.cpp                         | 17 +++++++++++++++++
 libs/taskmanager/tasksmodel.h                           |  4 +++-
 .../desktop/applets/tasks/package/contents/ui/Task.qml  |  4 ++++
 3 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/libs/taskmanager/tasksmodel.cpp b/libs/taskmanager/tasksmodel.cpp
index b849528..472cd76 100644
--- a/libs/taskmanager/tasksmodel.cpp
+++ b/libs/taskmanager/tasksmodel.cpp
@@ -25,6 +25,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 
THE SOFTWARE.
 #include "tasksmodel.h"
 
 #include <QMetaEnum>
+#include <QMimeData>
 
 #include <KDebug>
 
@@ -171,6 +172,22 @@ QVariant TasksModel::data(const QModelIndex &index, int 
role) const
         }
 
         return windows;
+    } else if (role == TasksModel::MimeType) {
+        if (item->itemType() == TaskItemType) {
+            return Task::mimetype();
+        } else if (item->itemType() == GroupItemType) {
+            return Task::groupMimetype();
+        }
+    } else if (role == TasksModel::MimeData) {
+        QMimeData mimeData;
+
+        item->addMimeData(&mimeData);
+
+        if (item->itemType() == TaskItemType) {
+            return QVariant::fromValue(mimeData.data(Task::mimetype()));
+        } else if (item->itemType() == GroupItemType) {
+            return QVariant::fromValue(mimeData.data(Task::groupMimetype()));
+        }
     }
 
     return QVariant();
diff --git a/libs/taskmanager/tasksmodel.h b/libs/taskmanager/tasksmodel.h
index d87d037..9c1b3f7 100644
--- a/libs/taskmanager/tasksmodel.h
+++ b/libs/taskmanager/tasksmodel.h
@@ -63,7 +63,9 @@ public:
         Active = Qt::UserRole + 17,
         DemandsAttention = Qt::UserRole + 18,
         LauncherUrl = Qt::UserRole + 19,
-        WindowList = Qt::UserRole + 20
+        WindowList = Qt::UserRole + 20,
+        MimeType = Qt::UserRole + 21,
+        MimeData = Qt::UserRole + 22
     };
 
     explicit TasksModel(GroupManager *groupManager, QObject *parent = 0);
diff --git a/plasma/desktop/applets/tasks/package/contents/ui/Task.qml 
b/plasma/desktop/applets/tasks/package/contents/ui/Task.qml
index c0fa99b..9efbff5 100644
--- a/plasma/desktop/applets/tasks/package/contents/ui/Task.qml
+++ b/plasma/desktop/applets/tasks/package/contents/ui/Task.qml
@@ -56,6 +56,10 @@ DragArea {
         url: model.LauncherUrl
     }
 
+    onDragStarted: {
+        mimeData.setData(model.MimeType, model.MimeData);
+    }
+
     onItemIndexChanged: {
         if (!inPopup && !tasks.vertical && Layout.calculateStripes() > 1) {
             var newWidth = Layout.taskWidth();
-- 
1.8.3.4

++++++ 0002-Fix-rare-race-condition-crash.patch ++++++
>From 4f4290491b517ce0288aa9ea07c5885c985f6093 Mon Sep 17 00:00:00 2001
From: Eike Hein <[email protected]>
Date: Wed, 14 Aug 2013 18:32:24 +0200
Subject: [PATCH 3/8] Fix rare race condition crash.

Plus surrounding code cleanup.

BUG:323496
---
 libs/taskmanager/tasksmodel.cpp | 28 +++++++++++++++-------------
 libs/taskmanager/tasksmodel.h   |  3 ++-
 2 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/libs/taskmanager/tasksmodel.cpp b/libs/taskmanager/tasksmodel.cpp
index 472cd76..d38cbfa 100644
--- a/libs/taskmanager/tasksmodel.cpp
+++ b/libs/taskmanager/tasksmodel.cpp
@@ -193,24 +193,26 @@ QVariant TasksModel::data(const QModelIndex &index, int 
role) const
     return QVariant();
 }
 
-int TasksModel::activeTaskId() const
+int TasksModel::activeTaskId(TaskGroup *group) const
 {
-    foreach (AbstractGroupableItem *item, d->rootGroup->members()) {
-        if (item->itemType() == TaskItemType && static_cast<TaskItem 
*>(item)->task()->isActive()) {
-            return item->id();
-        } else {
-            if (item->itemType() == GroupItemType)
-            {
-                foreach(AbstractGroupableItem *subItem, static_cast<TaskGroup 
*>(item)->members()) {
-                    if (subItem->itemType() == TaskItemType && 
static_cast<TaskItem *>(subItem)->task()->isActive()) {
-                        return subItem->id();
-                    }
-                }
+    group = group ? group : d->rootGroup;
+    int id = -1;
+
+    foreach (AbstractGroupableItem *item, group->members()) {
+        if (item->itemType() == TaskItemType) {
+            TaskItem *taskItem = static_cast<TaskItem *>(item);
+
+            if (taskItem && taskItem->task() && taskItem->task()->isActive()) {
+                id = item->id();
+
+                break;
             }
+        } else if (item->itemType() == GroupItemType) {
+            id = activeTaskId(static_cast<TaskGroup *>(item));
         }
     }
 
-    return -1;
+    return id;
 }
 
 QVariant TasksModel::taskIdList(const QModelIndex& parent, bool recursive) 
const
diff --git a/libs/taskmanager/tasksmodel.h b/libs/taskmanager/tasksmodel.h
index 9c1b3f7..92f9d2e 100644
--- a/libs/taskmanager/tasksmodel.h
+++ b/libs/taskmanager/tasksmodel.h
@@ -33,6 +33,7 @@ namespace TaskManager
 {
 
 class GroupManager;
+class TaskGroup;
 class TasksModelPrivate;
 
 class TASKMANAGER_EXPORT TasksModel : public QAbstractItemModel
@@ -79,7 +80,7 @@ public:
     Q_INVOKABLE int rowCount(const QModelIndex &parent = QModelIndex()) const;
     Q_INVOKABLE int launcherCount() const;
 
-    Q_INVOKABLE int activeTaskId() const;
+    Q_INVOKABLE int activeTaskId(TaskGroup *group = 0) const;
     Q_INVOKABLE QVariant taskIdList(const QModelIndex &parent = QModelIndex(), 
bool recursive = true) const;
 
 signals:
-- 
1.8.3.4

++++++ 0003-make-stacking_order-exclusive-during-shutdown.patch ++++++
>From 97f94f8805d47c092424017c7dc860ea1f5d0239 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20L=C3=BCbking?= <[email protected]>
Date: Sun, 11 Aug 2013 19:02:53 +0200
Subject: [PATCH 02/10] make stacking_order exclusive during shutdown

Client::releaseClient() deletes all Client objects
referenced by stacking_order, thus those pointers
dangle and everything trying to touch it died an ugly death.

REVIEW: 112020
BUG: 323383
---
 kwin/workspace.cpp | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/kwin/workspace.cpp b/kwin/workspace.cpp
index 8237eed..3ec6979 100644
--- a/kwin/workspace.cpp
+++ b/kwin/workspace.cpp
@@ -420,8 +420,13 @@ Workspace::~Workspace()
     // TODO: grabXServer();
 
     // Use stacking_order, so that kwin --replace keeps stacking order
-    for (ToplevelList::iterator it = stacking_order.begin(), end = 
stacking_order.end(); it != end; ++it) {
-        Client *c = qobject_cast<Client*>(*it);
+    const ToplevelList stack = stacking_order;
+    // "mutex" the stackingorder, since anything trying to access it from now 
on will find
+    // many dangeling pointers and crash
+    stacking_order.clear();
+
+    for (ToplevelList::const_iterator it = stack.constBegin(), end = 
stack.constEnd(); it != end; ++it) {
+        Client *c = qobject_cast<Client*>(const_cast<Toplevel*>(*it));
         if (!c) {
             continue;
         }
-- 
1.8.3.4



-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to