From 4ca4bb3f6e83f17a1ae7746b245fd4df0dbe310d Mon Sep 17 00:00:00 2001 From: Mai Lavelle Date: Sat, 26 Mar 2016 19:34:22 -0400 Subject: [PATCH] Fix issue with invert effect not persisting after lock screen --- extension.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/extension.js b/extension.js index af07d2a..5c39b89 100644 --- a/extension.js +++ b/extension.js @@ -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); @@ -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() {