Skip to content

Commit

Permalink
fix window decorations activate/destroy on setting change
Browse files Browse the repository at this point in the history
  • Loading branch information
jonian committed Jan 15, 2018
1 parent a3af262 commit 4bc88ec
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions [email protected]/modules/windowDecoration.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,20 +169,25 @@ var WindowDecoration = new Lang.Class({

_toggle: function() {
this._enabled = this._settings.get_enum('hide-window-titlebars');
this._enabled != 0 ? this._create() : this.destroy();
this._enabled != 0 ? this._activate() : this.destroy();
},

_create: function() {
_activate: function() {
Mainloop.idle_add(Lang.bind(this, this._addUserStyles));
Mainloop.idle_add(Lang.bind(this, this._undecorateWindows));

this._connectSignals();
if (!this._activated) {
this._activated = true;
this._connectSignals();
}
},

destroy: function() {
Mainloop.idle_add(Lang.bind(this, this._removeUserStyles));
Mainloop.idle_add(Lang.bind(this, this._decorateWindows));

this._disconnectSignals();

this._activated = false;
}
});

0 comments on commit 4bc88ec

Please sign in to comment.