diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index b2cdb3d9d..6bd3b1398 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -326,6 +326,8 @@ var AllView = class AllView extends BaseAppView { this._folderSettings.connect('changed::folder-children', () => { Main.queueDeferredWork(this._redisplayWorkId); }); + + this._nEventBlockerInhibits = 0; } _redisplay() { @@ -668,6 +670,19 @@ var AllView = class AllView extends BaseAppView { for (let i = 0; i < this.folderIcons.length; i++) this.folderIcons[i].adaptToSize(availWidth, availHeight); } + + inhibitEventBlocker() { + this._nEventBlockerInhibits++; + this._eventBlocker.visible = this._nEventBlockerInhibits == 0; + } + + uninhibitEventBlocker() { + if (this._nEventBlockerInhibits === 0) + throw new Error('Not inhibited'); + + this._nEventBlockerInhibits--; + this._eventBlocker.visible = this._nEventBlockerInhibits == 0; + } }; Signals.addSignalMethods(AllView.prototype);