Skip to content

Commit

Permalink
add window state settings support in window decorations
Browse files Browse the repository at this point in the history
  • Loading branch information
jonian committed Jan 14, 2018
1 parent 2d3800d commit 5062e8f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions [email protected]/modules/windowDecoration.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ 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);
}
},

_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);
Expand Down Expand Up @@ -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);
Expand All @@ -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;
Expand Down

1 comment on commit 5062e8f

@jonian
Copy link
Member Author

@jonian jonian commented on 5062e8f Jan 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixes issue #20

Please sign in to comment.