effects/desktopgrid: Fix TapHandler.onTapped handler

The button is provided alongside the event point now.
This commit is contained in:
Vlad Zahorodnii 2023-03-01 19:12:21 +02:00
parent 3aa16bd1ca
commit 77a1aea281

View file

@ -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 {