overview: Make preparation to enter/leave overview explicit
This give us more control on when the preparation happens and will be used in the subsequent commit. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2532>
This commit is contained in:
parent
b8b8919563
commit
f23ca85f79
@ -78,6 +78,14 @@ class OverviewActor extends St.BoxLayout {
|
|||||||
this.add_child(this._controls);
|
this.add_child(this._controls);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
prepareToEnterOverview() {
|
||||||
|
this._controls.prepareToEnterOverview();
|
||||||
|
}
|
||||||
|
|
||||||
|
prepareToLeaveOverview() {
|
||||||
|
this._controls.prepareToLeaveOverview();
|
||||||
|
}
|
||||||
|
|
||||||
animateToOverview(state, callback) {
|
animateToOverview(state, callback) {
|
||||||
this._controls.animateToOverview(state, callback);
|
this._controls.animateToOverview(state, callback);
|
||||||
}
|
}
|
||||||
@ -511,6 +519,7 @@ var Overview = class extends Signals.EventEmitter {
|
|||||||
|
|
||||||
Meta.disable_unredirect_for_display(global.display);
|
Meta.disable_unredirect_for_display(global.display);
|
||||||
|
|
||||||
|
this._overview.prepareToEnterOverview();
|
||||||
this._overview.animateToOverview(state, () => this._showDone());
|
this._overview.animateToOverview(state, () => this._showDone());
|
||||||
|
|
||||||
Main.layoutManager.overviewGroup.set_child_above_sibling(
|
Main.layoutManager.overviewGroup.set_child_above_sibling(
|
||||||
@ -564,6 +573,7 @@ var Overview = class extends Signals.EventEmitter {
|
|||||||
this._animationInProgress = true;
|
this._animationInProgress = true;
|
||||||
this._visibleTarget = false;
|
this._visibleTarget = false;
|
||||||
|
|
||||||
|
this._overview.prepareToLeaveOverview();
|
||||||
this._overview.animateFromOverview(() => this._hideDone());
|
this._overview.animateFromOverview(() => this._hideDone());
|
||||||
|
|
||||||
Main.layoutManager.overviewGroup.set_child_above_sibling(
|
Main.layoutManager.overviewGroup.set_child_above_sibling(
|
||||||
|
@ -727,8 +727,6 @@ class ControlsManager extends St.Widget {
|
|||||||
animateToOverview(state, callback) {
|
animateToOverview(state, callback) {
|
||||||
this._ignoreShowAppsButtonToggle = true;
|
this._ignoreShowAppsButtonToggle = true;
|
||||||
|
|
||||||
this.prepareToEnterOverview();
|
|
||||||
|
|
||||||
this._stateAdjustment.value = ControlsState.HIDDEN;
|
this._stateAdjustment.value = ControlsState.HIDDEN;
|
||||||
this._stateAdjustment.ease(state, {
|
this._stateAdjustment.ease(state, {
|
||||||
duration: Overview.ANIMATION_TIME,
|
duration: Overview.ANIMATION_TIME,
|
||||||
@ -748,8 +746,6 @@ class ControlsManager extends St.Widget {
|
|||||||
animateFromOverview(callback) {
|
animateFromOverview(callback) {
|
||||||
this._ignoreShowAppsButtonToggle = true;
|
this._ignoreShowAppsButtonToggle = true;
|
||||||
|
|
||||||
this.prepareToLeaveOverview();
|
|
||||||
|
|
||||||
this._stateAdjustment.ease(ControlsState.HIDDEN, {
|
this._stateAdjustment.ease(ControlsState.HIDDEN, {
|
||||||
duration: Overview.ANIMATION_TIME,
|
duration: Overview.ANIMATION_TIME,
|
||||||
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
|
||||||
|
Loading…
Reference in New Issue
Block a user