From 7c44af3616d1631c1804f3718472d5132fb84ff2 Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Fri, 26 Jun 2015 22:05:58 -0700 Subject: [PATCH] osdMonitorLabeler: avoid tweening the labels The control center will call this method when the configuration dialog for a display opens/closes, which will cause the same labels to quickly fade out and in again, looking like it's flickering. This commit fixes the issue by removing the tweens altogether. https://bugzilla.gnome.org/show_bug.cgi?id=751599 --- js/ui/osdMonitorLabeler.js | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/js/ui/osdMonitorLabeler.js b/js/ui/osdMonitorLabeler.js index 9d519f501..90682bdf0 100644 --- a/js/ui/osdMonitorLabeler.js +++ b/js/ui/osdMonitorLabeler.js @@ -15,8 +15,7 @@ const OsdMonitorLabel = new Lang.Class({ Name: 'OsdMonitorLabel', _init: function(monitor, label) { - this._actor = new St.Widget({ opacity: 0, - x_expand: true, + this._actor = new St.Widget({ x_expand: true, y_expand: true }); this._monitor = monitor; @@ -34,10 +33,6 @@ const OsdMonitorLabel = new Lang.Class({ this._position(); Meta.disable_unredirect_for_screen(global.screen); - Tweener.addTween(this._actor, - { opacity: 255, - time: FADE_TIME, - transition: 'easeOutQuad' }); }, _position: function() { @@ -52,15 +47,8 @@ const OsdMonitorLabel = new Lang.Class({ }, destroy: function() { - Tweener.addTween(this._actor, - { opacity: 0, - time: FADE_TIME, - transition: 'easeOutQuad', - onComplete: Lang.bind(this, function() { - this._actor.destroy(); - Meta.enable_unredirect_for_screen(global.screen); - }) - }); + this._actor.destroy(); + Meta.enable_unredirect_for_screen(global.screen); } });