diff --git a/metadata.json b/metadata.json index 44b85644..e814cb3d 100644 --- a/metadata.json +++ b/metadata.json @@ -5,7 +5,7 @@ "url": "https://github.com/paperwm/PaperWM", "settings-schema": "org.gnome.shell.extensions.paperwm", "shell-version": [ "45", "46" ], - "version-name": "46.6.4", + "version-name": "46.6.5", "donations": { "buymeacoffee": "jaytaala", "patreon": "valpackett" diff --git a/tiling.js b/tiling.js index c54cdcac..3501a134 100644 --- a/tiling.js +++ b/tiling.js @@ -1995,6 +1995,7 @@ border-radius: ${borderWidth}px; this.getWindows().forEach(w => { removeHandlerFlags(w); delete w.pos_mismatch_count; + delete w.tiled_on_minimize; }); this.signals.destroy(); this.signals = null; @@ -4315,10 +4316,23 @@ export function focus_handler(metaWindow) { Push all minimized windows to the scratch layer */ export function minimizeHandler(metaWindow) { - console.debug('minimized', metaWindow?.title); if (metaWindow.minimized) { + console.debug('minimized', metaWindow?.title); + // check if was tiled + if (isTiled(metaWindow)) { + metaWindow.tiled_on_minimize = true; + } Scratch.makeScratch(metaWindow); } + else { + console.debug('unminimized', metaWindow?.title); + if (metaWindow.tiled_on_minimize) { + delete metaWindow.tiled_on_minimize; + Utils.later_add(Meta.LaterType.IDLE, () => { + Scratch.unmakeScratch(metaWindow); + }); + } + } } /**