@@ -608,6 +608,10 @@ void workspace_show(Con *workspace) {
608
608
609
609
/* Push any sticky windows to the now visible workspace. */
610
610
output_push_sticky_windows (old_focus );
611
+
612
+ /* update num_last_selected for this workspaces with same num (but diff name) */
613
+ clear_num_last_selected_by_num (workspace -> num );
614
+ workspace -> num_last_selected = true;
611
615
}
612
616
613
617
/*
@@ -678,8 +682,6 @@ Con *workspace_next(void) {
678
682
if (child == current ) {
679
683
found_current = true;
680
684
} else if (found_current && current -> num == child -> num ) {
681
- clear_num_last_selected_by_num (child -> num );
682
- child -> num_last_selected = true;
683
685
return child ;
684
686
}
685
687
}
@@ -690,10 +692,6 @@ Con *workspace_next(void) {
690
692
next = first_opposite ? first_opposite : first ;
691
693
}
692
694
693
- if (next ) {
694
- clear_num_last_selected_by_num (next -> num );
695
- next -> num_last_selected = true;
696
- }
697
695
return next ;
698
696
}
699
697
@@ -760,8 +758,6 @@ Con *workspace_prev(void) {
760
758
if (child == current ) {
761
759
found_current = true;
762
760
} else if (found_current && current -> num == child -> num ) {
763
- clear_num_last_selected_by_num (child -> num );
764
- child -> num_last_selected = true;
765
761
return child ;
766
762
}
767
763
}
@@ -772,10 +768,6 @@ Con *workspace_prev(void) {
772
768
prev = first_opposite ? first_opposite : last ;
773
769
}
774
770
775
- if (prev ) {
776
- clear_num_last_selected_by_num (prev -> num );
777
- prev -> num_last_selected = true;
778
- }
779
771
return prev ;
780
772
}
781
773
0 commit comments