File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -642,7 +642,11 @@ var AppGroup = class AppGroup {
642642 const { appId, metaWindows, lastFocused} = this . groupState ;
643643
644644 if ( hasFocus === undefined ) {
645- hasFocus = this . workspaceState . lastFocusedApp === appId ;
645+ if ( this . state . settings . groupApps ) {
646+ hasFocus = this . workspaceState . lastFocusedApp === appId ;
647+ } else {
648+ hasFocus = this . groupState . metaWindows . includes ( this . workspaceState . lastFocusedWindow ) ;
649+ }
646650 }
647651
648652 // If any of the windows associated with our app have focus,
@@ -977,7 +981,10 @@ var AppGroup = class AppGroup {
977981 this . updateNotificationsBadge ( ) ;
978982 const hasFocus = getFocusState ( metaWindow ) ;
979983 if ( hasFocus ) {
980- this . workspaceState . set ( { lastFocusedApp : this . groupState . appId } ) ;
984+ this . workspaceState . set ( {
985+ lastFocusedApp : this . groupState . appId ,
986+ lastFocusedWindow : metaWindow
987+ } ) ;
981988 }
982989 this . onFocusChange ( hasFocus ) ;
983990 }
You can’t perform that action at this time.
0 commit comments