on xenial help sign in
fixed move workspace content order
421d2a7Nick Dedekind
plugins/WindowManager/WorkspaceManager.cpp+3−3
@@ -79,7 +79,7 @@ void WorkspaceManager::destroyWorkspace(Workspace *workspace)
79 setActiveWorkspace(m_allWorkspaces.count() ? *m_allWorkspaces.begin() : nullptr);
79 setActiveWorkspace(m_allWorkspaces.count() ? *m_allWorkspaces.begin() : nullptr);
80 }
80 }
81 if (m_activeWorkspace) {
81 if (m_activeWorkspace) {
82− moveWorkspaceContentToWorkspace(workspace, m_activeWorkspace);
82+ moveWorkspaceContentToWorkspace(m_activeWorkspace, workspace);
83 }
83 }
84
84
85 disconnect(workspace, 0, this, 0);
85 disconnect(workspace, 0, this, 0);
@@ -107,11 +107,11 @@ void WorkspaceManager::moveSurfaceToWorkspace(unity::shell::application::MirSurf
107 }
107 }
108}
108}
109
109
110−void WorkspaceManager::moveWorkspaceContentToWorkspace(Workspace *from, Workspace *to)
110+void WorkspaceManager::moveWorkspaceContentToWorkspace(Workspace *to, Workspace *from)
111{
111{
112 auto surfaceManager = WindowManagerObjects::instance()->surfaceManager();
112 auto surfaceManager = WindowManagerObjects::instance()->surfaceManager();
113 if (surfaceManager) {
113 if (surfaceManager) {
114− surfaceManager->moveWorkspaceContentToWorkspace(from->workspace(), to->workspace());
114+ surfaceManager->moveWorkspaceContentToWorkspace(to->workspace(), from->workspace());
115 }
115 }
116}
116}
117
117
plugins/WindowManager/WorkspaceManager.h+1−1
@@ -52,7 +52,7 @@ public:
52 Q_INVOKABLE void moveSurfaceToWorkspace(unity::shell::application::MirSurfaceInterface* surface,
52 Q_INVOKABLE void moveSurfaceToWorkspace(unity::shell::application::MirSurfaceInterface* surface,
53 Workspace* workspace);
53 Workspace* workspace);
54
54
55− Q_INVOKABLE void moveWorkspaceContentToWorkspace(Workspace* from, Workspace* to);
55+ Q_INVOKABLE void moveWorkspaceContentToWorkspace(Workspace* to, Workspace* from);
56
56
57Q_SIGNALS:
57Q_SIGNALS:
58 void activeWorkspaceChanged();
58 void activeWorkspaceChanged();