Don't grab key focus when clicking desktop grid

Resolves: #2150001
This commit is contained in:
Florian Müllner 2022-12-15 17:32:55 +01:00
parent efffbcd201
commit 8609634ee4
2 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,33 @@
From 8bea7c892c24694efda753ad1d76ab470032c6fe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Thu, 15 Dec 2022 17:09:45 +0100
Subject: [PATCH] desktop-icons: Don't grab focus on click
We will move keyboard focus away immediately, either when opening
the context menu or when starting the rubberband.
In theory the grab is still useful, because it will move keyboard
focus to the grid when restoring focus after ending the rubberband
or closing the menu, however as keyboard navigation support is
lacking, all it does is preventing the focus to return to the
focus window after the operation.
---
extensions/desktop-icons/desktopGrid.js | 2 --
1 file changed, 2 deletions(-)
diff --git a/extensions/desktop-icons/desktopGrid.js b/extensions/desktop-icons/desktopGrid.js
index 002803c7..9a89d5a3 100644
--- a/extensions/desktop-icons/desktopGrid.js
+++ b/extensions/desktop-icons/desktopGrid.js
@@ -559,8 +559,6 @@ var DesktopGrid = GObject.registerClass({
let button = event.get_button();
let [x, y] = event.get_coords();
- this._grid.grab_key_focus();
-
if (button == 1) {
let shiftPressed = !!(event.get_state() & Clutter.ModifierType.SHIFT_MASK);
let controlPressed = !!(event.get_state() & Clutter.ModifierType.CONTROL_MASK);
--
2.38.1

View File

@ -35,6 +35,7 @@ Patch012: gnome-classic-wayland.patch
Patch013: 0001-desktop-icons-Fix-stuck-grab-issue-with-rubber-bandi.patch
Patch014: window-list-touch.patch
Patch015: 0001-classification-banner-Handle-fullscreen-monitors.patch
Patch016: 0001-desktop-icons-Don-t-grab-focus-on-click.patch
%description
GNOME Shell Extensions is a collection of extensions providing additional and
@ -411,6 +412,8 @@ workspaces.
* Wed Dec 14 2022 Florian Müllner <fmuellner@redhat.com> - 40.7-4
- Adjust classification banner position in fullscreen
Resolves: #2153524
- Don't grab focus when clicking desktop grid
Resolves: #2150001
* Wed Jun 22 2022 Florian Müllner <fmuellner@redhat.com> - 40.7-3
- Improve window-list on touch