on xenial help sign in
finalize drag and drop for apps to another workspace

(not working yet for some reason, likely in the backend stuff that's to be debugged still)

commit61ee47989b4145724d7bc94b1e37910d01bd74e1 authorMichael Zanetti <michael.zanetti@canonical.com> dateTue 14 Mar 2017, 13:11 (10 years ago) parent6008b1d
3 files changed+16
qml/ShellApplication.qml+6 qml/Stage/Spread/SpreadDelegateInputArea.qml+1 qml/Stage/Spread/Workspaces.qml+9
qml/ShellApplication.qml+6
@@ -45,4 +45,10 @@ Instantiator {
4545 Component.onCompleted: screen.active = primary
4646 primary: index == 0
4747 }
48+
49+ property var workspaceManagerSurfaceManagerBinding: Binding {
50+ target: WorkspaceManager
51+ property: "surfaceManager"
52+ value: SurfaceManager
53+ }
4854}
qml/Stage/Spread/SpreadDelegateInputArea.qml+1
@@ -143,6 +143,7 @@ Item {
143143
144144 onReleased: {
145145 print("released!")
146+ var result = fakeDragItem.Drag.drop();
146147 fakeDragItem.surface = null;
147148
148149 if (!d.moving) {
qml/Stage/Spread/Workspaces.qml+9
@@ -56,6 +56,15 @@ Item {
5656 onExited: {
5757 listView.hoveredWorkspaceIndex = -1
5858 }
59+ onDropped: {
60+ var surface = drag.source.surface;
61+ var workspace = listView.model.get(listView.hoveredWorkspaceIndex);
62+ print("dropping surface", surface, "on workspace", workspace)
63+ WorkspaceManager.moveSurfaceToWorkspace(surface, workspace);
64+ drop.accept(Qt.MoveAction)
65+ listView.hoveredWorkspaceIndex = -1
66+ root.commitScreenSetup();
67+ }
5968 }
6069
6170 ListView {