From 8609634ee4f3049444f0794803ecac454e102d9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Thu, 15 Dec 2022 17:32:55 +0100 Subject: [PATCH] Don't grab key focus when clicking desktop grid Resolves: #2150001 --- ...ktop-icons-Don-t-grab-focus-on-click.patch | 33 +++++++++++++++++++ gnome-shell-extensions.spec | 3 ++ 2 files changed, 36 insertions(+) create mode 100644 0001-desktop-icons-Don-t-grab-focus-on-click.patch diff --git a/0001-desktop-icons-Don-t-grab-focus-on-click.patch b/0001-desktop-icons-Don-t-grab-focus-on-click.patch new file mode 100644 index 0000000..2b1358d --- /dev/null +++ b/0001-desktop-icons-Don-t-grab-focus-on-click.patch @@ -0,0 +1,33 @@ +From 8bea7c892c24694efda753ad1d76ab470032c6fe Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Florian=20M=C3=BCllner?= +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 + diff --git a/gnome-shell-extensions.spec b/gnome-shell-extensions.spec index 22d9161..a04321b 100644 --- a/gnome-shell-extensions.spec +++ b/gnome-shell-extensions.spec @@ -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 - 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 - 40.7-3 - Improve window-list on touch