Skip to content

Commit 5e15ba5

Browse files
committed
gwl: Improve window state management
1 parent ca1779e commit 5e15ba5

2 files changed

Lines changed: 12 additions & 8 deletions

File tree

files/usr/share/cinnamon/applets/[email protected]/appGroup.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -988,6 +988,8 @@ class AppGroup {
988988

989989
this.signals.disconnect('notify::title', metaWindow);
990990
this.signals.disconnect('notify::appears-focused', metaWindow);
991+
this.signals.disconnect('notify::icon', metaWindow);
992+
this.signals.disconnect('notify::progress', metaWindow);
991993

992994
this.groupState.metaWindows.splice(refWindow, 1);
993995

files/usr/share/cinnamon/applets/[email protected]/workspace.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -351,15 +351,17 @@ class Workspace {
351351
windowRemoved(metaWorkspace, metaWindow) {
352352
if (!this.state) return;
353353

354-
if ((metaWindow.is_on_all_workspaces() || this.state.settings.showAllWorkspaces
355-
|| !this.state.settings.showAllWorkspaces)
354+
// Abort the remove if the window is just changing workspaces, window
355+
// should always remain indexed on all workspaces while its mapped.
356+
// if (!metaWindow.showing_on_its_workspace()) return;
357+
if ((this.state.settings.showAllWorkspaces) && (metaWindow.has_focus()
358+
&& global.workspace_manager.get_active_workspace_index()
359+
!== metaWorkspace.index())) return;
360+
361+
// If the window is on all workspaces or we're showing all workspaces,
362+
// make sure to remove the window from all workspaces.
363+
if ((metaWindow.is_on_all_workspaces() || this.state.settings.showAllWorkspaces)
356364
&& !this.state.removingWindowFromWorkspaces) {
357-
// Abort the remove if the window is just changing workspaces, window
358-
// should always remain indexed on all workspaces while its mapped.
359-
// if (!metaWindow.showing_on_its_workspace()) return;
360-
if ((this.state.settings.showAllWorkspaces) && (metaWindow.has_focus()
361-
&& global.workspace_manager.get_active_workspace_index()
362-
!== metaWorkspace.index())) return;
363365
this.state.removingWindowFromWorkspaces = true;
364366
this.state.trigger('removeWindowFromAllWorkspaces', metaWindow);
365367
return;

0 commit comments

Comments
 (0)