viewSelector: Make sure it's invisible when overview is hidden

Instead of overriding the hide() method, use the vfunc to
reset, and hide the workspaces display too.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1295
This commit is contained in:
Georges Basile Stavracas Neto 2020-06-02 14:21:02 -03:00
parent fc3bc7678d
commit 5569090d1c

View File

@ -132,6 +132,7 @@ var ViewSelector = GObject.registerClass({
super._init({ super._init({
name: 'viewSelector', name: 'viewSelector',
x_expand: true, x_expand: true,
visible: false,
}); });
this._showAppsButton = showAppsButton; this._showAppsButton = showAppsButton;
@ -272,6 +273,7 @@ var ViewSelector = GObject.registerClass({
} }
animateToOverview() { animateToOverview() {
this.show();
this.reset(); this.reset();
this._workspacesDisplay.animateToOverview(this._showAppsButton.checked); this._workspacesDisplay.animateToOverview(this._showAppsButton.checked);
this._activePage = null; this._activePage = null;
@ -301,9 +303,11 @@ var ViewSelector = GObject.registerClass({
this._workspacesDisplay.setWorkspacesFullGeometry(geom); this._workspacesDisplay.setWorkspacesFullGeometry(geom);
} }
hide() { vfunc_hide() {
this.reset(); this.reset();
this._workspacesDisplay.hide(); this._workspacesDisplay.hide();
super.vfunc_hide();
} }
_addPage(actor, name, a11yIcon, params) { _addPage(actor, name, a11yIcon, params) {