Skip to content

Commit 8733de3

Browse files
committed
gwl: Improve window state management
1 parent 9305dc6 commit 8733de3

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
@@ -989,6 +989,8 @@ var AppGroup = class AppGroup {
989989

990990
this.signals.disconnect('notify::title', metaWindow);
991991
this.signals.disconnect('notify::appears-focused', metaWindow);
992+
this.signals.disconnect('notify::icon', metaWindow);
993+
this.signals.disconnect('notify::progress', metaWindow);
992994

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

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

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

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

0 commit comments

Comments
 (0)