mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-08-06 21:48:30 -04:00
fix(dash): resolve pointer cursor hover issue in connected mode (#2845)
* fix(dash): cursor not changing to pointer in Connected Mode (#2831)
Replaces the full-screen background dismissal MouseArea in
DankPopoutConnected.qml with four edge strips that exclude
the popup body. The full-screen MouseArea at z:-1 was
suppressing child cursorShape propagation on Wayland when
combined with the full-screen input mask.
Blame: the connected popout architecture itself (the issue
does not repro in Separate Mode where background dismissal
lives in a separate PanelWindow).
* fix(dash): resolve pointer cursor hover issue in connected mode
(cherry picked from commit 3f5a54aa88)
This commit is contained in:
committed by
bbedward
parent
fcda17f517
commit
7f37799e53
@@ -226,6 +226,13 @@ DankPopout {
|
|||||||
LayoutMirroring.enabled: I18n.isRtl
|
LayoutMirroring.enabled: I18n.isRtl
|
||||||
LayoutMirroring.childrenInherit: true
|
LayoutMirroring.childrenInherit: true
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
z: -1
|
||||||
|
enabled: root.__dropdownType !== 0
|
||||||
|
onClicked: root.__hideDropdowns()
|
||||||
|
}
|
||||||
|
|
||||||
implicitWidth: Math.max(700, pages.implicitWidth + (Theme.spacingM * 2))
|
implicitWidth: Math.max(700, pages.implicitWidth + (Theme.spacingM * 2))
|
||||||
implicitHeight: contentColumn.height + Theme.spacingM * 2
|
implicitHeight: contentColumn.height + Theme.spacingM * 2
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import qs.Widgets
|
|||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
visible: dropdownType !== 0
|
||||||
|
|
||||||
LayoutMirroring.enabled: I18n.isRtl
|
LayoutMirroring.enabled: I18n.isRtl
|
||||||
LayoutMirroring.childrenInherit: true
|
LayoutMirroring.childrenInherit: true
|
||||||
@@ -582,10 +583,4 @@ Item {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
|
||||||
anchors.fill: parent
|
|
||||||
z: -1
|
|
||||||
enabled: dropdownType !== 0
|
|
||||||
onClicked: closeRequested()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -996,18 +996,53 @@ Item {
|
|||||||
height: root.renderedAlignedHeight + contentContainer.verticalConnectorExtent * 2
|
height: root.renderedAlignedHeight + contentContainer.verticalConnectorExtent * 2
|
||||||
}
|
}
|
||||||
|
|
||||||
MouseArea {
|
Item {
|
||||||
anchors.fill: parent
|
id: backgroundClickCatcher
|
||||||
enabled: shouldBeVisible && backgroundInteractive
|
|
||||||
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
|
|
||||||
z: -1
|
z: -1
|
||||||
onClicked: mouse => {
|
enabled: shouldBeVisible && backgroundInteractive
|
||||||
const clickX = mouse.x;
|
x: 0
|
||||||
const clickY = mouse.y;
|
y: 0
|
||||||
const outsideContent = clickX < root.alignedX || clickX > root.alignedX + root.alignedWidth || clickY < root.renderedAlignedY || clickY > root.renderedAlignedY + root.renderedAlignedHeight;
|
width: parent.width
|
||||||
if (!outsideContent)
|
height: parent.height
|
||||||
return;
|
|
||||||
backgroundClicked();
|
// Four edge strips that exclude the popup body, so cursor shapes
|
||||||
|
// inside the content propagate correctly (full-screen MouseAreas
|
||||||
|
// at z:-1 can suppress child cursorShape on Wayland).
|
||||||
|
MouseArea {
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
width: parent.width
|
||||||
|
height: root.renderedAlignedY
|
||||||
|
enabled: parent.enabled
|
||||||
|
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
|
||||||
|
onClicked: backgroundClicked()
|
||||||
|
}
|
||||||
|
MouseArea {
|
||||||
|
x: 0
|
||||||
|
y: root.renderedAlignedY + root.renderedAlignedHeight
|
||||||
|
width: parent.width
|
||||||
|
height: Math.max(0, parent.height - root.renderedAlignedY - root.renderedAlignedHeight)
|
||||||
|
enabled: parent.enabled
|
||||||
|
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
|
||||||
|
onClicked: backgroundClicked()
|
||||||
|
}
|
||||||
|
MouseArea {
|
||||||
|
x: 0
|
||||||
|
y: root.renderedAlignedY
|
||||||
|
width: root.alignedX
|
||||||
|
height: root.renderedAlignedHeight
|
||||||
|
enabled: parent.enabled
|
||||||
|
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
|
||||||
|
onClicked: backgroundClicked()
|
||||||
|
}
|
||||||
|
MouseArea {
|
||||||
|
x: root.alignedX + root.alignedWidth
|
||||||
|
y: root.renderedAlignedY
|
||||||
|
width: Math.max(0, parent.width - root.alignedX - root.alignedWidth)
|
||||||
|
height: root.renderedAlignedHeight
|
||||||
|
enabled: parent.enabled
|
||||||
|
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
|
||||||
|
onClicked: backgroundClicked()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user