Skip to content

Commit 8198512

Browse files
committed
gwl: Only set appGroup focus if app actually has focus
This avoids an issue where during workspace switching some times a minimized window would visually have the focused window style when it shouldn't.
1 parent f70951b commit 8198512

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

files/usr/share/cinnamon/applets/grouped-window-list@cinnamon.org/appGroup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ class AppGroup {
639639
const {appId, metaWindows, lastFocused} = this.groupState;
640640

641641
if (hasFocus === undefined) {
642-
hasFocus = this.workspaceState.lastFocusedApp === appId;
642+
hasFocus = this.workspaceState.lastFocusedApp === appId && getFocusState(lastFocused);
643643
}
644644

645645
// If any of the windows associated with our app have focus,

files/usr/share/cinnamon/applets/grouped-window-list@cinnamon.org/scrollBox.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ class ScrollBox {
3535
this.scrollActiveTimeoutId = 0;
3636

3737
this.signals.connect(this.actor, 'scroll-event', (actor, event) => this._onScroll(actor, event));
38-
3938
this.signals.connect(this.actor, 'motion-event', (actor, event) => this._onMotionEvent(actor, event));
4039
this.signals.connect(this.actor, 'leave-event', () => this._stopEdgeScroll());
4140

files/usr/share/cinnamon/applets/grouped-window-list@cinnamon.org/workspace.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ class Workspace {
4343
},
4444
updateFocusState: (focusedAppId) => {
4545
this.appGroups.forEach( appGroup => {
46-
if (focusedAppId === appGroup.groupState.appId) {
46+
if (focusedAppId === appGroup.groupState.appId &&
47+
(!appGroup.groupState.lastFocused || appGroup.groupState.lastFocused.has_focus())) {
4748
this.scrollToAppGroup(appGroup);
4849
return;
4950
};

0 commit comments

Comments
 (0)