From 509c38caeebc99c5b24cf45d635b05dd700013be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Hedin=20Br=C3=B8nner?= Date: Thu, 4 Apr 2019 09:44:50 +0200 Subject: [PATCH] toggle-scratch-window: only hide when the scratch window has focus This makes it easier to switch between the tiling and a floating window. --- scratch.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scratch.js b/scratch.js index 99a13a3..3a96dd0 100644 --- a/scratch.js +++ b/scratch.js @@ -157,7 +157,8 @@ function toggleScratch() { } function toggleScratchWindow() { - if (isScratchActive()) + let focus = global.display.focus_window; + if (isScratchWindow(focus)) hide(); else show(true);