File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ function onActivated(client) {
66
66
if ( client == null ) return ;
67
67
debug ( "\nactivated" , client . caption ) ;
68
68
removeMinimized ( client ) ;
69
- minimizeOverlapping ( ) ;
69
+ minimizeOverlapping ( client ) ;
70
70
restoreMinimized ( ) ;
71
71
}
72
72
@@ -90,7 +90,7 @@ function onAdded(client) {
90
90
function onRegeometrized ( client ) {
91
91
debug ( "\nregeometrized" , client && client . caption ? client . caption : client ) ;
92
92
removeMinimized ( client ) ;
93
- minimizeOverlapping ( ) ;
93
+ minimizeOverlapping ( client ) ;
94
94
restoreMinimized ( ) ;
95
95
}
96
96
@@ -118,9 +118,9 @@ function onRemoved(client) {
118
118
///////////////////////
119
119
120
120
// minimize all windows overlapped by active window
121
- function minimizeOverlapping ( ) {
122
- // get active window
123
- active = workspace . activeClient ;
121
+ function minimizeOverlapping ( active ) {
122
+ // if no window is provided, set default to the active window
123
+ if ( active == null || active == undefined ) active = workspace . activeClient ;
124
124
// don't act on windows that are dead or still undergoing geometry change
125
125
if ( active == undefined || active == null || active . move || active . resize ) return ;
126
126
debug ( "try minimize for" , active . caption ) ;
You can’t perform that action at this time.
0 commit comments