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 {