[gnome-shell-extensions] window-list: Fix primary button action on touch
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions] window-list: Fix primary button action on touch
- Date: Wed, 22 Jun 2022 10:41:45 +0000 (UTC)
commit fe60614b41ac844f109d2961782c247f6b40cad0
Author: Florian Müllner <fmuellner gnome org>
Date: Thu Apr 21 16:34:50 2022 +0200
window-list: Fix primary button action on touch
If a click event was triggered via touch rather than a pointer
device, the button parameter is 0 rather than a mouse button
number.
Account for that to make sure that touch events are not misinterpreted
as right clicks.
https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/146
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/merge_requests/233>
extensions/window-list/extension.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js
index 500695b..f3045ec 100644
--- a/extensions/window-list/extension.js
+++ b/extensions/window-list/extension.js
@@ -391,7 +391,7 @@ class WindowButton extends BaseButton {
return;
}
- if (button === 1)
+ if (!button || button === 1)
this._minimizeOrActivateWindow(this.metaWindow);
else
this._openMenu(this._contextMenu);
@@ -637,7 +637,7 @@ class AppButton extends BaseButton {
if (contextMenuWasOpen)
this._contextMenu.close();
- if (button === 1) {
+ if (!button || button === 1) {
if (menuWasOpen)
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]