mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-15 00:34:05 +09:00
Restore intellihide grabs check for PanelMenuButton
This commit is contained in:
@@ -20,6 +20,7 @@ const Clutter = imports.gi.Clutter;
|
||||
const Meta = imports.gi.Meta;
|
||||
const Shell = imports.gi.Shell;
|
||||
|
||||
const GrabHelper = imports.ui.grabHelper;
|
||||
const Layout = imports.ui.layout;
|
||||
const Main = imports.ui.main;
|
||||
const OverviewControls = imports.ui.overviewControls;
|
||||
@@ -32,10 +33,12 @@ const Utils = Me.imports.utils;
|
||||
|
||||
//timeout intervals
|
||||
const CHECK_POINTER_MS = 200;
|
||||
const CHECK_GRAB_MS = 400;
|
||||
const POST_ANIMATE_MS = 50;
|
||||
const MIN_UPDATE_MS = 250;
|
||||
|
||||
//timeout names
|
||||
const T1 = 'checkGrabTimeout';
|
||||
const T2 = 'limitUpdateTimeout';
|
||||
const T3 = 'postAnimateTimeout';
|
||||
|
||||
@@ -295,7 +298,8 @@ var Intellihide = Utils.defineClass({
|
||||
},
|
||||
|
||||
_checkIfShouldBeVisible: function(fromRevealMechanism) {
|
||||
if (Main.overview.visibleTarget || this._dtpPanel.taskbar.previewMenu.opened || this._panelBox.get_hover()) {
|
||||
if (Main.overview.visibleTarget || this._dtpPanel.taskbar.previewMenu.opened ||
|
||||
this._panelBox.get_hover() || this._checkIfGrab()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -317,6 +321,17 @@ var Intellihide = Utils.defineClass({
|
||||
return !this._windowOverlap;
|
||||
},
|
||||
|
||||
_checkIfGrab: function() {
|
||||
if (GrabHelper._grabHelperStack.some(gh => this._panelBox.contains(gh._owner))) {
|
||||
//there currently is a grab on a child of the panel, check again soon to catch its release
|
||||
this._timeoutsHandler.add([T1, CHECK_GRAB_MS, () => this._queueUpdatePanelPosition()]);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
|
||||
_revealPanel: function(immediate) {
|
||||
this._animatePanel(0, immediate);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user