@@ -114,7 +114,7 @@ var removed = false;
114
114
115
115
// trigger minimize and restore
116
116
// when client is initially present, added or activated
117
- workspace . clientList ( ) . forEach ( client => onActivated ( client ) ) ;
117
+ workspace . clientList ( ) . forEach ( onActivated ) ;
118
118
workspace . clientAdded . connect ( onActivated ) ;
119
119
workspace . clientActivated . connect ( onActivated ) ;
120
120
function onActivated ( client ) {
@@ -130,7 +130,7 @@ function onActivated(client) {
130
130
131
131
// add to watchlist on added and trigger minimize and restore
132
132
// when client is moved or resized or screen geometry changes
133
- workspace . clientList ( ) . forEach ( client => onAdded ( client ) ) ;
133
+ workspace . clientList ( ) . forEach ( onAdded ) ;
134
134
workspace . clientAdded . connect ( onAdded ) ;
135
135
function onAdded ( client ) {
136
136
debug ( "====================" )
@@ -145,13 +145,20 @@ var block = false;
145
145
function onAddedOnRegeometrized ( client ) {
146
146
[ client . clientGeometryChanged ,
147
147
client . frameGeometryChanged ,
148
- client . moveResizedChanged ,
148
+ client . moveResizedChanged ,
149
149
client . fullScreenChanged ,
150
150
client . clientMaximizedStateChanged ,
151
151
client . screenChanged ,
152
152
client . desktopChanged ,
153
153
client . activitiesChanged ] .
154
154
forEach ( signal => signal . connect ( onRegeometrized ) ) ;
155
+ client . clientStartUserMovedResized . connect ( client => {
156
+ // block = true;
157
+ } ) ;
158
+ client . clientFinishUserMovedResized . connect ( client => {
159
+ block = false ;
160
+ onRegeometrized ( client ) ;
161
+ } ) ;
155
162
}
156
163
function onRegeometrized ( client ) {
157
164
if ( ! client ) return ;
@@ -218,6 +225,7 @@ function onRemoved(client) {
218
225
// minimize all windows overlapped by active window
219
226
function minimizeOverlapping ( active ) {
220
227
if ( ! active ) active = workspace . activeClient ;
228
+ debug ( active . caption , active . resourceName , active . resourceName == "krunner" , [ "plasmashell" , "krunner" ] . includes ( String ( active . resourceName ) ) , config . ignoreShell && [ "plasmashell" , "krunner" ] . includes ( String ( active . resourceName ) ) ) ;
221
229
if ( ! active || ignoreClient ( active ) || ignoreFront ( active ) ) return ;
222
230
debug ( "- apply minimize for" , caption ( active ) ) ;
223
231
fulldebug ( properties ( active ) ) ;
@@ -354,33 +362,31 @@ function overlapVertical(win1, win2) {
354
362
///////////////////////
355
363
356
364
function ignoreClient ( win ) {
357
- return ! ( win . desktop == workspace . currentDesktop // different desktop
358
- || win . onAllDesktops )
359
- || ( config . ignoreNonnormal // non-normal window
360
- && ! win . normalWindow )
365
+ return ! ( win . desktop == workspace . currentDesktop || win . onAllDesktops )
366
+ // different desktop
367
+ || ( config . ignoreNonnormal && ! win . normalWindow ) // non-normal window
361
368
|| ( config . ignoreShell // desktop shell window
362
- && [ "plasmashell" , "krunner" ] . includes ( win . resourceName ) )
369
+ && [ "plasmashell" , "krunner" ] . includes ( String ( win . resourceName ) ) )
363
370
|| win . desktopWindow || win . dock // special window
364
371
|| win . dnd || win . tooltip || win . onScreenDisplay
365
372
|| win . notification || win . criticalNotification
366
- // || win.move || win.resize // still undergoing geometry change
367
373
}
368
374
369
375
function ignoreFront ( front ) {
370
- return ( config . excludeMode // application excluded
371
- && config . excludedAppsForeground . includes ( front . resourceClass ) )
372
- || ( config . includeMode // application not included
373
- && ! config . includedAppsForeground . includes ( front . resourceClass ) )
376
+ return ( config . excludeMode && config . excludedAppsForeground
377
+ . includes ( String ( front . resourceClass ) ) ) // application excluded
378
+ || ( config . includeMode && ! config . includedAppsForeground
379
+ . includes ( String ( front . resourceClass ) ) ) // application not included
374
380
|| [ workspace . clientArea ( KWin . FullScreenArea , front ) ,
375
381
workspace . clientArea ( KWin . ScreenArea , front ) ]
376
382
. includes ( front . geometry ) // fullscreen
377
383
}
378
384
379
385
function ignoreBack ( back ) {
380
- return ( config . excludeMode // application excluded
381
- && config . excludedAppsBackground . includes ( back . resourceClass ) )
382
- || ( config . includeMode // application not included
383
- && ! config . includedAppsBackground . includes ( back . resourceClass ) )
386
+ return ( config . excludeMode && config . excludedAppsBackground
387
+ . includes ( String ( back . resourceClass ) ) ) // application excluded
388
+ || ( config . includeMode && ! config . includedAppsBackground
389
+ . includes ( String ( back . resourceClass ) ) ) // application not included
384
390
|| ! back . minimizable // not minimizable
385
391
}
386
392
0 commit comments