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
This commit is contained in:
Cosimo Cecchi 2015-06-26 22:05:58 -07:00
parent 0599bf41b0
commit 7c44af3616

View File

@ -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);
})
});
}
});