Skip to content

Commit

Permalink
Fix issue with invert effect not persisting after lock screen
Browse files Browse the repository at this point in the history
  • Loading branch information
maiself committed Mar 26, 2016
1 parent f501b0e commit 4ca4bb3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,12 @@ InvertWindow.prototype = {
if(meta_window.has_focus()) {
if(actor.get_effect('invert-color')) {
actor.remove_effect_by_name('invert-color');
delete meta_window._invert_window_tag;
}
else {
let effect = new InvertWindowEffect();
actor.add_effect_with_name('invert-color', effect);
meta_window._invert_window_tag = true;
}
}
}, this);
Expand Down Expand Up @@ -88,6 +90,14 @@ InvertWindow.prototype = {
}
return clone;
});

global.get_window_actors().forEach(function(actor) {
let meta_window = actor.get_meta_window();
if(meta_window.hasOwnProperty('_invert_window_tag')) {
let effect = new InvertWindowEffect();
actor.add_effect_with_name('invert-color', effect);
}
}, this);
},

disable: function() {
Expand Down

0 comments on commit 4ca4bb3

Please sign in to comment.