plugins/overview: Fix MMB and RMB

Both MMB and RMB are broken because acceptedPointerTypes doesn't accept
PointerDevice.GenericPointer.

RMB is broken because there's no "desktopView" object.

BUG: 475681
This commit is contained in:
Vlad Zahorodnii 2023-10-24 12:11:36 +03:00
parent 765ffb7ff4
commit 255283b74a

View file

@ -596,7 +596,7 @@ FocusScope {
opacity: 1 - downGestureProgress
onDownGestureTriggered: window.closeWindow()
TapHandler {
acceptedPointerTypes: PointerDevice.GenericPointer | PointerDevice.Pen
acceptedPointerTypes: PointerDevice.Generic | PointerDevice.Pen
acceptedButtons: Qt.MiddleButton | Qt.RightButton
onTapped: (eventPoint, button) => {
if (button === Qt.MiddleButton) {
@ -605,7 +605,7 @@ FocusScope {
if (window.desktops.length > 0) {
window.desktops = [];
} else {
window.desktops = [desktopView.desktop];
window.desktops = [mainBackground.desktop];
}
}
}