From 6a2863ea091fde6bce02fb088102f277055e4313 Mon Sep 17 00:00:00 2001 From: T99Rots Date: Mon, 1 Aug 2022 11:37:17 +0200 Subject: [PATCH 1/2] fix for issue #1676 by adding checking for button 0 --- appIcons.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/appIcons.js b/appIcons.js index ab0d22b6..0148aeae 100644 --- a/appIcons.js +++ b/appIcons.js @@ -868,7 +868,10 @@ var TaskbarAppIcon = GObject.registerClass({ else buttonAction = Me.settings.get_string('middle-click-action'); } - else if (button && button == 1) { + // fixed issue #1676 by checking for button 0 or 1 to also handle touchscreen + // input, probably not the proper fix as i'm not aware button 0 should exist + // but from using this fix for months it seems to not create any issues + else if (typeof button === 'number' && (button == 0 || button == 1)) { let now = global.get_current_time() doubleClick = now - this.lastClick < DOUBLE_CLICK_DELAY_MS From 269aa77f0ef409d63a5ee21453298a07b3fb00fb Mon Sep 17 00:00:00 2001 From: T99Rots Date: Mon, 1 Aug 2022 11:59:26 +0200 Subject: [PATCH 2/2] fixed the show desktop button not responding to touch events mentioned in #1676 by @catscratchedme --- panel.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/panel.js b/panel.js index 4e55b66f..e3dcdeca 100644 --- a/panel.js +++ b/panel.js @@ -1170,6 +1170,11 @@ var Panel = GObject.registerClass({ this._setShowDesktopButtonStyle(); + this._showDesktopButton.connect('touch-event', (actor, event) => { + if (event.type() == Clutter.EventType.TOUCH_BEGIN) { + this._onShowDesktopButtonPress(); + } + }); this._showDesktopButton.connect('button-press-event', () => this._onShowDesktopButtonPress()); this._showDesktopButton.connect('enter-event', () => { this._showDesktopButton.add_style_class_name(this._getBackgroundBrightness() ?