File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -352,10 +352,16 @@ impl CosmicStack {
352352 }
353353 FocusDirection :: In if swap. is_none ( ) => {
354354 if !p. group_focused . swap ( false , Ordering :: SeqCst ) {
355- p. windows . lock ( ) . unwrap ( ) . iter ( ) . for_each ( |w| {
356- w. set_activated ( true ) ;
357- w. send_configure ( ) ;
358- } ) ;
355+ p. windows
356+ . lock ( )
357+ . unwrap ( )
358+ . iter ( )
359+ . enumerate ( )
360+ . for_each ( |( i, w) | {
361+ w. set_activated ( p. active . load ( Ordering :: SeqCst ) == i) ;
362+ w. send_configure ( ) ;
363+ } ) ;
364+
359365 ( true , true )
360366 } else {
361367 ( false , false )
@@ -1162,7 +1168,11 @@ impl SpaceElement for CosmicStack {
11621168 . lock ( )
11631169 . unwrap ( )
11641170 . iter ( )
1165- . for_each ( |w| SpaceElement :: set_activate ( w, activated) )
1171+ . enumerate ( )
1172+ . for_each ( |( i, w) | {
1173+ w. set_activated ( activated && p. active . load ( Ordering :: SeqCst ) == i) ;
1174+ w. send_configure ( ) ;
1175+ } ) ;
11661176 }
11671177 p. activated . swap ( activated, Ordering :: SeqCst ) != activated
11681178 } ) ;
You can’t perform that action at this time.
0 commit comments