diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js index fa8202ee8..870cf11be 100644 --- a/js/ui/overviewControls.js +++ b/js/ui/overviewControls.js @@ -715,11 +715,19 @@ class ControlsManager extends St.Widget { this._workspacesDisplay.hide(); } + prepareToEnterOverview() { + this._searchController.prepareToEnterOverview(); + this._workspacesDisplay.prepareToEnterOverview(); + } + + prepareToLeaveOverview() { + this._workspacesDisplay.prepareToLeaveOverview(); + } + animateToOverview(state, callback) { this._ignoreShowAppsButtonToggle = true; - this._searchController.prepareToEnterOverview(); - this._workspacesDisplay.prepareToEnterOverview(); + this.prepareToEnterOverview(); this._stateAdjustment.value = ControlsState.HIDDEN; this._stateAdjustment.ease(state, { @@ -740,7 +748,7 @@ class ControlsManager extends St.Widget { animateFromOverview(callback) { this._ignoreShowAppsButtonToggle = true; - this._workspacesDisplay.prepareToLeaveOverview(); + this.prepareToLeaveOverview(); this._stateAdjustment.ease(ControlsState.HIDDEN, { duration: Overview.ANIMATION_TIME, @@ -775,8 +783,7 @@ class ControlsManager extends St.Widget { this._stateAdjustment.remove_transition('value'); tracker.confirmSwipe(baseDistance, points, progress, cancelProgress); - this._workspacesDisplay.prepareToEnterOverview(); - this._searchController.prepareToEnterOverview(); + this.prepareToEnterOverview(); this._stateAdjustment.gestureInProgress = true; } @@ -786,7 +793,7 @@ class ControlsManager extends St.Widget { gestureEnd(target, duration, onComplete) { if (target === ControlsState.HIDDEN) - this._workspacesDisplay.prepareToLeaveOverview(); + this.prepareToLeaveOverview(); this.dash.showAppsButton.checked = target === ControlsState.APP_GRID; @@ -804,8 +811,7 @@ class ControlsManager extends St.Widget { async runStartupAnimation(callback) { this._ignoreShowAppsButtonToggle = true; - this._searchController.prepareToEnterOverview(); - this._workspacesDisplay.prepareToEnterOverview(); + this.prepareToEnterOverview(); this._stateAdjustment.value = ControlsState.HIDDEN; this._stateAdjustment.ease(ControlsState.WINDOW_PICKER, {