legacyTray: Remove pointer barrier when the tray is hidden
https://bugzilla.gnome.org/show_bug.cgi?id=746579
This commit is contained in:
parent
2ce7a3baa6
commit
ef6e8f5bb2
@ -205,11 +205,7 @@ const LegacyTray = new Lang.Class({
|
|||||||
this._horizontalBarrier.y2 == y2)
|
this._horizontalBarrier.y2 == y2)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (this._horizontalBarrier) {
|
this._unsetBarrier();
|
||||||
this._pressureBarrier.removeBarrier(this._horizontalBarrier);
|
|
||||||
this._horizontalBarrier.destroy();
|
|
||||||
this._horizontalBarrier = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
let directions = (rtl ? Meta.BarrierDirection.NEGATIVE_X : Meta.BarrierDirection.POSITIVE_X);
|
let directions = (rtl ? Meta.BarrierDirection.NEGATIVE_X : Meta.BarrierDirection.POSITIVE_X);
|
||||||
this._horizontalBarrier = new Meta.Barrier({ display: global.display,
|
this._horizontalBarrier = new Meta.Barrier({ display: global.display,
|
||||||
@ -219,6 +215,15 @@ const LegacyTray = new Lang.Class({
|
|||||||
this._pressureBarrier.addBarrier(this._horizontalBarrier);
|
this._pressureBarrier.addBarrier(this._horizontalBarrier);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_unsetBarrier: function() {
|
||||||
|
if (this._horizontalBarrier == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this._pressureBarrier.removeBarrier(this._horizontalBarrier);
|
||||||
|
this._horizontalBarrier.destroy();
|
||||||
|
this._horizontalBarrier = null;
|
||||||
|
},
|
||||||
|
|
||||||
_sync: function() {
|
_sync: function() {
|
||||||
// FIXME: we no longer treat tray icons as notifications
|
// FIXME: we no longer treat tray icons as notifications
|
||||||
let allowed = Main.sessionMode.hasNotifications;
|
let allowed = Main.sessionMode.hasNotifications;
|
||||||
@ -244,12 +249,14 @@ const LegacyTray = new Lang.Class({
|
|||||||
targetSlide *= CONCEALED_VISIBLE_FRACTION;
|
targetSlide *= CONCEALED_VISIBLE_FRACTION;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.actor.visible)
|
if (this.actor.visible) {
|
||||||
Tweener.addTween(this._slideLayout,
|
Tweener.addTween(this._slideLayout,
|
||||||
{ slideX: targetSlide,
|
{ slideX: targetSlide,
|
||||||
time: REVEAL_ANIMATION_TIME,
|
time: REVEAL_ANIMATION_TIME,
|
||||||
transition: 'easeOutQuad' });
|
transition: 'easeOutQuad' });
|
||||||
else
|
} else {
|
||||||
this._slideLayout.slideX = targetSlide;
|
this._slideLayout.slideX = targetSlide;
|
||||||
|
this._unsetBarrier();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user