import gnome-shell-extensions-3.32.1-14.el8
This commit is contained in:
parent
cf9da3e90c
commit
8be5960283
@ -0,0 +1,83 @@
|
||||
From f78b19068654412ca9e73a229e1537d080759c47 Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Garnacho <carlosg@gnome.org>
|
||||
Date: Wed, 27 Jan 2021 16:55:10 +0100
|
||||
Subject: [PATCH] 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.
|
||||
---
|
||||
extensions/desktop-icons/fileItem.js | 26 +++++++++++++++++++++++---
|
||||
1 file changed, 23 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/extensions/desktop-icons/fileItem.js b/extensions/desktop-icons/fileItem.js
|
||||
index d6d43c9..5d3195f 100644
|
||||
--- a/extensions/desktop-icons/fileItem.js
|
||||
+++ b/extensions/desktop-icons/fileItem.js
|
||||
@@ -65,6 +65,9 @@ var FileItem = class {
|
||||
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;
|
||||
|
||||
@@ -642,7 +645,24 @@ var FileItem = class {
|
||||
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)
|
||||
@@ -661,7 +681,7 @@ var FileItem = class {
|
||||
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;
|
||||
@@ -710,12 +730,12 @@ var FileItem = class {
|
||||
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();
|
||||
this.emit('selected', shiftPressed || controlPressed, false, true);
|
||||
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;
|
||||
--
|
||||
2.29.2
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
Name: gnome-shell-extensions
|
||||
Version: 3.32.1
|
||||
Release: 13%{?dist}
|
||||
Release: 14%{?dist}
|
||||
Summary: Modify and extend GNOME Shell functionality and behavior
|
||||
|
||||
Group: User Interface/Desktops
|
||||
@ -38,6 +38,7 @@ Patch0009: 0001-dashToDock-Handle-no-overview-case.patch
|
||||
Patch0010: 0001-window-list-Invalid-current-mode-selected-in-Prefere.patch
|
||||
Patch0011: 0001-Update-desktop-icons-gettext-domain.patch
|
||||
Patch0012: 0001-desktop-icons-Update-Japanese-translation.patch
|
||||
Patch0013: 0001-fileItem-Ignore-double-click-distance-clicking-on-it.patch
|
||||
|
||||
%description
|
||||
GNOME Shell Extensions is a collection of extensions providing additional and
|
||||
@ -471,6 +472,10 @@ cp $RPM_SOURCE_DIR/gnome-classic.desktop $RPM_BUILD_ROOT%{_datadir}/xsessions
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Jan 27 2021 Carlos Garnacho <cgarnach@redhat.com> - 3.32.1-14
|
||||
- Use same logic than Nautilus for double click/tap in desktop-icons extension
|
||||
Resolves: #1842229
|
||||
|
||||
* Wed Jan 27 2021 Florian Müllner <fmuellner@redhat.com> - 3.32.1-13
|
||||
- Update Japanese translation
|
||||
Related: #1865718
|
||||
|
Loading…
Reference in New Issue
Block a user