on xenial help sign in
properly create and destroy workspaces
commit44063d458da9db1bd8d9dd08172bf79e5a14555c authorMichael Zanetti <michael.zanetti@canonical.com> dateThu 23 Feb 2017, 18:54 (10 years ago) parent6c68622
1 file changed+6−1
qml/Stage/Spread/Workspaces.qml+6−1
qml/Stage/Spread/Workspaces.qml+6−1
@@ -1,5 +1,6 @@
11import QtQuick 2.4
22import Ubuntu.Components 1.3
3+import WindowManager 1.0
34import "MathUtils.js" as MathUtils
45import "../../Components"
56
@@ -38,6 +39,7 @@ Item {
3839 }
3940
4041 onDropped: {
42+ drop.accept(Qt.MoveAction);
4143 listView.dropItemIndex = -1;
4244 drag.source.inDropArea = false;
4345 }
@@ -219,7 +221,10 @@ Item {
219221 }
220222
221223 onReleased: {
222− fakeDragItem.Drag.drop();
224+ var result = fakeDragItem.Drag.drop();
225+ if (result == Qt.IgnoreAction) {
226+ WorkspaceManager.destroyWorkspace(fakeDragItem.workspace);
227+ }
223228 drag.target = null;
224229 }
225230