From f215d61ba7eef63b9e81a37202acc92879404f79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Hedin=20Br=C3=B8nner?= Date: Thu, 21 Sep 2017 02:11:51 +0200 Subject: [PATCH] Move show panel animation to a signal Should ideally have hide animation in a signal too, but this doesn't seem to be viable as it gnome-shell tries really hard to hide the panel when focusing a fullscreen window. Ie. if we disconnect both signals, show the panel while animating out gnome-shell will just hide it again. --- tiling.js | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/tiling.js b/tiling.js index 13b17b6..4cb9447 100644 --- a/tiling.js +++ b/tiling.js @@ -19,6 +19,16 @@ stack_margin = 75 statusbar_height = Main.layoutManager.panelBox.height; +Main.layoutManager.panelBox.connect('show', () => { + Tweener.addTween(Main.layoutManager.panelBox, { + y: 0, + time: 0.25, + onOverWrite: () => { + Main.layoutManager.panelBox.y = 0; + } + }); +}) + workspaces = [] for (let i=0; i < global.screen.n_workspaces; i++) { workspaces[i] = [] @@ -137,11 +147,7 @@ ensure_viewport = (meta_window, force) => { // Hack to ensure the statusbar is visible while there's a fullscreen // windows in the workspace. if (!Main.layoutManager.panelBox.visible) { - Main.layoutManager.panelBox.visible = true; - Tweener.addTween(Main.layoutManager.panelBox, { - y: 0, - time: 0.25 - }); + Main.layoutManager.panelBox.show(); } let x = frame.x;