From 571a2d06802c2c8211ae7eb3deb74ce4716dac1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20J=C3=B8rgen=20Br=C3=B8nner?= Date: Sat, 26 Jan 2019 14:05:09 +0100 Subject: [PATCH] Don't show actors of minimized scratch windows Specifically fixes bug where whole scratch layer become visible (but only the actors) when reloading (or disable/enable cycle) when at least on scratch window was active. This also sometimes crashed gnome-shell (confirmed on v3.28.3 - ubuntu 18.04) Also remove some code who seem to partly work around the problem --- scratch.js | 4 +++- tiling.js | 7 +------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/scratch.js b/scratch.js index 21c50ef..73851ac 100644 --- a/scratch.js +++ b/scratch.js @@ -21,7 +21,9 @@ function makeScratch(metaWindow) { metaWindow[float] = true; metaWindow.make_above(); metaWindow.stick(); - Tiling.showWindow(metaWindow); + + if (!metaWindow.minimized) + Tiling.showWindow(metaWindow); let monitor = focusMonitor(); if (monitor.clickOverlay) diff --git a/tiling.js b/tiling.js index 0b50022..4f115fd 100644 --- a/tiling.js +++ b/tiling.js @@ -1702,11 +1702,6 @@ function enable() { s.selectedWindow && ensureViewport(s.selectedWindow, s, true); s.monitor.clickOverlay.show(); }); - - if (!Scratch.isScratchActive()) { - Scratch.getScratchWindows().forEach( - w => w.get_compositor_private().hide()); - } } if (Main.layoutManager._startingUp) { @@ -2525,7 +2520,7 @@ function slurp(metaWindow) { } space[to].push(metaWindowToSlurp) - + { // Remove the slurped window let column = space[from]; let row = column.indexOf(metaWindowToSlurp);