From 5062e8f732949874e30ecc8284fa7d0cc262a14e Mon Sep 17 00:00:00 2001 From: Jonian Guveli Date: Sun, 14 Jan 2018 15:34:45 +0200 Subject: [PATCH] add window state settings support in window decorations --- unite@hardpixel.eu/modules/windowDecoration.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/unite@hardpixel.eu/modules/windowDecoration.js b/unite@hardpixel.eu/modules/windowDecoration.js index 51254e0..b1283ff 100644 --- a/unite@hardpixel.eu/modules/windowDecoration.js +++ b/unite@hardpixel.eu/modules/windowDecoration.js @@ -74,7 +74,7 @@ var WindowDecoration = new Lang.Class({ _updateTitlebar: function () { this._activeWindow = global.display.focus_window; - if (Helpers.isMaximized(this._activeWindow)) { + if (Helpers.isMaximized(this._activeWindow, this._enabled)) { this._hideTitlebar(this._activeWindow); } else { this._showTitlebar(this._activeWindow); @@ -82,7 +82,7 @@ var WindowDecoration = new Lang.Class({ }, _showTitlebar: function (win) { - if (win && !win._doingMaxUnmax && win._decorationOFF && win._windowXID) { + if (win && !win._doingMaxUnmax && win.decorated && win._decorationOFF && win._windowXID) { win._decorationOFF = false; this._toggleTitlebar(win._windowXID, false); @@ -139,7 +139,7 @@ var WindowDecoration = new Lang.Class({ let windows = Helpers.getAllWindows(); windows.forEach(Lang.bind(this, function (win) { - if (win.get_maximized() == MAXIMIZED) { + if (Helpers.isMaximized(win, this._enabled)) { this._hideTitlebar(win); } else { this._showTitlebar(win); @@ -151,6 +151,8 @@ var WindowDecoration = new Lang.Class({ let windows = Helpers.getAllWindows(); windows.forEach(Lang.bind(this, Lang.bind(this, function (win) { + win._decorationOFF = true; + this._showTitlebar(win); delete win._decorationOFF;