From 77a1aea281d51e8382bb1bdc4060cf008ebfbb9f Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Wed, 1 Mar 2023 19:12:21 +0200 Subject: [PATCH] effects/desktopgrid: Fix TapHandler.onTapped handler The button is provided alongside the event point now. --- src/effects/desktopgrid/qml/DesktopView.qml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/effects/desktopgrid/qml/DesktopView.qml b/src/effects/desktopgrid/qml/DesktopView.qml index f2f62f1f3e..1588fa8707 100644 --- a/src/effects/desktopgrid/qml/DesktopView.qml +++ b/src/effects/desktopgrid/qml/DesktopView.qml @@ -135,10 +135,10 @@ FocusScope { TapHandler { acceptedPointerTypes: PointerDevice.GenericPointer | PointerDevice.Pen acceptedButtons: Qt.MiddleButton | Qt.RightButton - onTapped: { - if (eventPoint.event.button === Qt.MiddleButton) { + onTapped: (eventPoint, button) => { + if (button === Qt.MiddleButton) { window.closeWindow(); - } else if (eventPoint.event.button === Qt.RightButton) { + } else if (button === Qt.RightButton) { if (window.desktops.length > 0) { window.desktops = []; } else {