Use preview opened state instead of hover for intellihide

This commit is contained in:
Charles Gagnon
2019-05-26 08:41:45 -04:00
parent c74fa64a66
commit 9c262facdc
3 changed files with 14 additions and 8 deletions

View File

@@ -187,9 +187,9 @@ var Intellihide = Utils.defineClass({
() => this._onHoverChanged()
],
[
this._dtpPanel.taskbar.previewMenu.menu,
'notify::hover',
() => this._onHoverChanged()
this._dtpPanel.taskbar.previewMenu,
'open-state-changed',
() => this._queueUpdatePanelPosition()
],
[
Main.overview,
@@ -203,7 +203,7 @@ var Intellihide = Utils.defineClass({
},
_onHoverChanged: function() {
this._hoveredOut = !this._panelBox.hover && !this._dtpPanel.taskbar.previewMenu.menu.hover;
this._hoveredOut = !this._panelBox.hover;
this._queueUpdatePanelPosition();
},
@@ -295,7 +295,7 @@ var Intellihide = Utils.defineClass({
},
_checkIfShouldBeVisible: function(fromRevealMechanism) {
if (Main.overview.visibleTarget || this._dtpPanel.taskbar.previewMenu.menu.get_hover() || this._panelBox.get_hover()) {
if (Main.overview.visibleTarget || this._dtpPanel.taskbar.previewMenu.opened || this._panelBox.get_hover()) {
return true;
}