protocol/workspace: Fix behavior with multiple manager instances
Similarly to https://github.com/pop-os/cosmic-comp/pull/1061, track a weak reference to the manager each workspace/group instance was created from, instead of just matching by client.
This commit is contained in:
parent
723f758439
commit
2728a9ee71
4 changed files with 65 additions and 69 deletions
|
|
@ -590,7 +590,7 @@ where
|
|||
.iter()
|
||||
.filter(|w| !handle_state.workspaces.contains(w))
|
||||
{
|
||||
if let Some(handle) = workspace_state.raw_workspace_handle(&new_workspace, &instance.id()) {
|
||||
for handle in workspace_state.raw_workspace_handles(&new_workspace, &instance.id()) {
|
||||
instance.workspace_enter(&handle);
|
||||
changed = true;
|
||||
}
|
||||
|
|
@ -600,7 +600,7 @@ where
|
|||
.iter()
|
||||
.filter(|w| !state.workspaces.contains(w))
|
||||
{
|
||||
if let Some(handle) = workspace_state.raw_workspace_handle(&old_workspace, &instance.id()) {
|
||||
for handle in workspace_state.raw_workspace_handles(&old_workspace, &instance.id()) {
|
||||
instance.workspace_leave(&handle);
|
||||
changed = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue