diff -Nru gnome-shell-extension-desktop-icons-20.04.0+git20200908/debian/changelog gnome-shell-extension-desktop-icons-20.04.0+git20200908/debian/changelog --- gnome-shell-extension-desktop-icons-20.04.0+git20200908/debian/changelog 2021-04-07 15:25:18.000000000 +0800 +++ gnome-shell-extension-desktop-icons-20.04.0+git20200908/debian/changelog 2021-07-14 20:56:32.000000000 +0800 @@ -1,3 +1,13 @@ +gnome-shell-extension-desktop-icons (20.04.0+git20200908-5ubuntu1.1) hirsute; urgency=medium + + [ Kai-Heng Feng ] + * d/p/fileItem-Ignore-double-click-distance-clicking-on-items.patch: + - Cherry picked upstream commit (LP: #1917010) + * debian/control: + - Add dependency gir1.2-clutter-1.0. + + -- Kai-Heng Feng Wed, 14 Jul 2021 20:56:32 +0800 + gnome-shell-extension-desktop-icons (20.04.0+git20200908-5build1) hirsute; urgency=medium * No-change rebuild diff -Nru gnome-shell-extension-desktop-icons-20.04.0+git20200908/debian/control gnome-shell-extension-desktop-icons-20.04.0+git20200908/debian/control --- gnome-shell-extension-desktop-icons-20.04.0+git20200908/debian/control 2021-04-07 15:25:18.000000000 +0800 +++ gnome-shell-extension-desktop-icons-20.04.0+git20200908/debian/control 2021-07-14 20:56:32.000000000 +0800 @@ -21,6 +21,7 @@ Architecture: all Depends: ${misc:Depends}, gnome-shell (>= 3.37), + gir1.2-clutter-1.0, gjs, nautilus (>= 3.30.4), xdg-desktop-portal diff -Nru gnome-shell-extension-desktop-icons-20.04.0+git20200908/debian/control.in gnome-shell-extension-desktop-icons-20.04.0+git20200908/debian/control.in --- gnome-shell-extension-desktop-icons-20.04.0+git20200908/debian/control.in 2020-12-08 02:16:04.000000000 +0800 +++ gnome-shell-extension-desktop-icons-20.04.0+git20200908/debian/control.in 2021-07-14 20:56:08.000000000 +0800 @@ -17,6 +17,7 @@ Architecture: all Depends: ${misc:Depends}, gnome-shell (>= 3.37), + gir1.2-clutter-1.0, gjs, nautilus (>= 3.30.4), xdg-desktop-portal diff -Nru gnome-shell-extension-desktop-icons-20.04.0+git20200908/debian/patches/fileItem-Ignore-double-click-distance-clicking-on-items.patch gnome-shell-extension-desktop-icons-20.04.0+git20200908/debian/patches/fileItem-Ignore-double-click-distance-clicking-on-items.patch --- gnome-shell-extension-desktop-icons-20.04.0+git20200908/debian/patches/fileItem-Ignore-double-click-distance-clicking-on-items.patch 1970-01-01 08:00:00.000000000 +0800 +++ gnome-shell-extension-desktop-icons-20.04.0+git20200908/debian/patches/fileItem-Ignore-double-click-distance-clicking-on-items.patch 2021-07-14 20:36:27.000000000 +0800 @@ -0,0 +1,78 @@ +From: Carlos Garnacho +Date: Wed, 27 Jan 2021 16:55:10 +0100 +Subject: fileItem: Ignore double click distance clicking on items + +Imitate the behavior of Nautilus canvas WRT double clicks being +handled on all of the icon(s) without accounting for the double +click distance. As the extension does already lean on Nautilus +look & feel, it seems to make sense doing this. + +This is not as crucial for mice as it is for touchscreens, where +the default 5px limit may be a bit on the short side depending +on device sensitivity. +--- + fileItem.js | 26 +++++++++++++++++++++++--- + 1 file changed, 23 insertions(+), 3 deletions(-) + +diff --git a/fileItem.js b/fileItem.js +index 832599d..1bcb23f 100644 +--- a/fileItem.js ++++ b/fileItem.js +@@ -75,6 +75,9 @@ var FileItem = GObject.registerClass({ + this._setMetadataCancellable = null; + this._queryFileInfoCancellable = null; + this._isSpecial = this._fileExtra != Prefs.FileType.NONE; ++ this._lastClickTime = 0; ++ this._lastClickButton = 0; ++ this._clickCount = 0; + + this._file = file; + this._mount = null; +@@ -739,7 +742,24 @@ var FileItem = GObject.registerClass({ + DesktopIconsUtil.launchTerminal(this.file.get_path()); + } + ++ _updateClickState(event) { ++ let settings = Clutter.Settings.get_default(); ++ if ((event.get_button() == this._lastClickButton) && ++ ((event.get_time() - this._lastClickTime) < settings.double_click_time)) ++ this._clickCount++; ++ else ++ this._clickCount = 1; ++ ++ this._lastClickTime = event.get_time(); ++ this._lastClickButton = event.get_button(); ++ } ++ ++ _getClickCount() { ++ return this._clickCount; ++ } ++ + _onPressButton(actor, event) { ++ this._updateClickState(event); + let button = event.get_button(); + if (button == 3) { + if (!this.isSelected) +@@ -758,7 +778,7 @@ var FileItem = GObject.registerClass({ + this._actionTrash.setSensitive(!specialFilesSelected); + return Clutter.EVENT_STOP; + } else if (button == 1) { +- if (event.get_click_count() == 1) { ++ if (this._getClickCount() == 1) { + let [x, y] = event.get_coords(); + this._primaryButtonPressed = true; + this._buttonPressInitialX = x; +@@ -817,11 +837,11 @@ var FileItem = GObject.registerClass({ + this._primaryButtonPressed = false; + let shiftPressed = !!(event.get_state() & Clutter.ModifierType.SHIFT_MASK); + let controlPressed = !!(event.get_state() & Clutter.ModifierType.CONTROL_MASK); +- if ((event.get_click_count() == 1) && Prefs.CLICK_POLICY_SINGLE && !shiftPressed && !controlPressed) ++ if ((this._getClickCount() == 1) && Prefs.CLICK_POLICY_SINGLE && !shiftPressed && !controlPressed) + this.doOpen(); + return Clutter.EVENT_STOP; + } +- if ((event.get_click_count() == 2) && (!Prefs.CLICK_POLICY_SINGLE)) ++ if ((this._getClickCount() == 2) && (!Prefs.CLICK_POLICY_SINGLE)) + this.doOpen(); + } + return Clutter.EVENT_PROPAGATE; diff -Nru gnome-shell-extension-desktop-icons-20.04.0+git20200908/debian/patches/series gnome-shell-extension-desktop-icons-20.04.0+git20200908/debian/patches/series --- gnome-shell-extension-desktop-icons-20.04.0+git20200908/debian/patches/series 2020-12-08 02:16:04.000000000 +0800 +++ gnome-shell-extension-desktop-icons-20.04.0+git20200908/debian/patches/series 2021-07-14 20:36:27.000000000 +0800 @@ -4,3 +4,4 @@ metadata-Bump-dependency-on-gnome-shell-3.38.patch desktopManager-Avoid-scheduling-multiple-_layoutChildren-.patch desktopManager-Allocate-the-draggable-actor-before-starti.patch +fileItem-Ignore-double-click-distance-clicking-on-items.patch