Fix scrolling between workspaces/app grid pages with PgUp/PgDn
This commit is contained in:
parent
75a4fd1636
commit
a39c114648
63
0001-workspacesView-Fix-PgUp-PgDown-shortcut.patch
Normal file
63
0001-workspacesView-Fix-PgUp-PgDown-shortcut.patch
Normal file
@ -0,0 +1,63 @@
|
||||
From fc54e0bed8dbab238394f6852d611d64b81f314e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Thu, 8 Apr 2021 17:19:37 +0200
|
||||
Subject: [PATCH 1/2] workspacesView: Fix PgUp/PgDown shortcut
|
||||
|
||||
We still try to switch to the workspace above/below, which doesn't
|
||||
do anything since the layout is now horizontal.
|
||||
|
||||
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1798>
|
||||
---
|
||||
js/ui/workspacesView.js | 28 ++++++++++++++++++++++------
|
||||
1 file changed, 22 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
|
||||
index 1af45d88d..2c9da5c9b 100644
|
||||
--- a/js/ui/workspacesView.js
|
||||
+++ b/js/ui/workspacesView.js
|
||||
@@ -1144,20 +1144,36 @@ class WorkspacesDisplay extends St.Widget {
|
||||
_onKeyPressEvent(actor, event) {
|
||||
if (!this.mapped)
|
||||
return Clutter.EVENT_PROPAGATE;
|
||||
- let workspaceManager = global.workspace_manager;
|
||||
- let activeWs = workspaceManager.get_active_workspace();
|
||||
- let ws;
|
||||
+
|
||||
+ const { workspaceManager } = global;
|
||||
+ const vertical = workspaceManager.layout_rows === -1;
|
||||
+ const rtl = this.get_text_direction() === Clutter.TextDirection.RTL;
|
||||
+
|
||||
+ let dir;
|
||||
switch (event.get_key_symbol()) {
|
||||
case Clutter.KEY_Page_Up:
|
||||
- ws = activeWs.get_neighbor(Meta.MotionDirection.UP);
|
||||
+ if (vertical)
|
||||
+ dir = Meta.MotionDirection.UP;
|
||||
+ else if (rtl)
|
||||
+ dir = Meta.MotionDirection.RIGHT;
|
||||
+ else
|
||||
+ dir = Meta.MotionDirection.LEFT;
|
||||
break;
|
||||
case Clutter.KEY_Page_Down:
|
||||
- ws = activeWs.get_neighbor(Meta.MotionDirection.DOWN);
|
||||
+ if (vertical)
|
||||
+ dir = Meta.MotionDirection.DOWN;
|
||||
+ else if (rtl)
|
||||
+ dir = Meta.MotionDirection.LEFT;
|
||||
+ else
|
||||
+ dir = Meta.MotionDirection.RIGHT;
|
||||
break;
|
||||
default:
|
||||
return Clutter.EVENT_PROPAGATE;
|
||||
}
|
||||
- Main.wm.actionMoveWorkspace(ws);
|
||||
+
|
||||
+ const ws = workspaceManager.get_active_workspace().get_neighbor(dir);
|
||||
+ if (ws)
|
||||
+ Main.wm.actionMoveWorkspace(ws);
|
||||
return Clutter.EVENT_STOP;
|
||||
}
|
||||
|
||||
--
|
||||
2.31.1
|
||||
|
@ -0,0 +1,32 @@
|
||||
From dd7d33622875c70f3f5965f387e4de7c99fbf330 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
|
||||
Date: Thu, 8 Apr 2021 17:31:54 +0200
|
||||
Subject: [PATCH 2/2] 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>
|
||||
---
|
||||
js/ui/workspacesView.js | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
|
||||
index 2c9da5c9b..502590418 100644
|
||||
--- a/js/ui/workspacesView.js
|
||||
+++ b/js/ui/workspacesView.js
|
||||
@@ -1142,7 +1142,8 @@ class WorkspacesDisplay extends St.Widget {
|
||||
}
|
||||
|
||||
_onKeyPressEvent(actor, event) {
|
||||
- if (!this.mapped)
|
||||
+ const { ControlsState } = OverviewControls;
|
||||
+ if (this._overviewAdjustment.value !== ControlsState.WINDOW_PICKER)
|
||||
return Clutter.EVENT_PROPAGATE;
|
||||
|
||||
const { workspaceManager } = global;
|
||||
--
|
||||
2.31.1
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Name: gnome-shell
|
||||
Version: 40.0
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: Window management and application launching for GNOME
|
||||
|
||||
License: GPLv2+
|
||||
@ -14,6 +14,12 @@ Patch1: gnome-shell-favourite-apps-firefox.patch
|
||||
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1940618
|
||||
Patch10001: 0001-loginDialog-Allow-timed-login-with-disabled-user-lis.patch
|
||||
# Fix PgUp/PgDn for scrolling between workspaces / app grid pages
|
||||
# https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1798
|
||||
# https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4086
|
||||
Patch10002: 0001-workspacesView-Fix-PgUp-PgDown-shortcut.patch
|
||||
Patch10003: 0002-workspacesView-Don-t-tie-PgUp-PgDown-to-mapped-state.patch
|
||||
|
||||
|
||||
%define eds_version 3.33.1
|
||||
%define gnome_desktop_version 3.35.91
|
||||
@ -228,6 +234,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/evolution-calendar.de
|
||||
%{_mandir}/man1/gnome-shell.1*
|
||||
|
||||
%changelog
|
||||
* Tue Apr 13 2021 Adam Williamson <awilliam@redhat.com> - 40.0-3
|
||||
- Fix scrolling between workspaces/app grid pages with PgUp/PgDn
|
||||
|
||||
* Tue Apr 13 2021 Ray Strode <rstrode@redhat.com> - 40.0-2
|
||||
- Fix timed login when user list is disabled
|
||||
Resolves: #1940618
|
||||
|
Loading…
Reference in New Issue
Block a user