workspacesView: Don't tie PgUp/PgDown to mapped state

Both app grid and window picker are now always visible in the overview,
so their handling of the PgUp/PgDown keys conflicts.

Resolve that by checking for the overview state instead.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1798>
This commit is contained in:
Florian Müllner 2021-04-08 17:31:54 +02:00
parent fc54e0bed8
commit dd7d336228

View File

@ -1142,7 +1142,8 @@ class WorkspacesDisplay extends St.Widget {
} }
_onKeyPressEvent(actor, event) { _onKeyPressEvent(actor, event) {
if (!this.mapped) const { ControlsState } = OverviewControls;
if (this._overviewAdjustment.value !== ControlsState.WINDOW_PICKER)
return Clutter.EVENT_PROPAGATE; return Clutter.EVENT_PROPAGATE;
const { workspaceManager } = global; const { workspaceManager } = global;