effects/desktopgrid: Fix TapHandler.onTapped handler
The button is provided alongside the event point now.
This commit is contained in:
parent
3aa16bd1ca
commit
77a1aea281
1 changed files with 3 additions and 3 deletions
|
@ -135,10 +135,10 @@ FocusScope {
|
||||||
TapHandler {
|
TapHandler {
|
||||||
acceptedPointerTypes: PointerDevice.GenericPointer | PointerDevice.Pen
|
acceptedPointerTypes: PointerDevice.GenericPointer | PointerDevice.Pen
|
||||||
acceptedButtons: Qt.MiddleButton | Qt.RightButton
|
acceptedButtons: Qt.MiddleButton | Qt.RightButton
|
||||||
onTapped: {
|
onTapped: (eventPoint, button) => {
|
||||||
if (eventPoint.event.button === Qt.MiddleButton) {
|
if (button === Qt.MiddleButton) {
|
||||||
window.closeWindow();
|
window.closeWindow();
|
||||||
} else if (eventPoint.event.button === Qt.RightButton) {
|
} else if (button === Qt.RightButton) {
|
||||||
if (window.desktops.length > 0) {
|
if (window.desktops.length > 0) {
|
||||||
window.desktops = [];
|
window.desktops = [];
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue