quickshell: fix clock click reopening after grabFocus dismiss
Clicking clock while popup open triggered grabFocus dismiss then immediately reopened. Add justDismissed guard so the click handler ignores the click that caused the dismiss. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
a6af5ac882
commit
3b7cc98fc9
1 changed files with 10 additions and 0 deletions
|
|
@ -518,6 +518,7 @@ in
|
|||
MouseArea {
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
if (calPopup.justDismissed) return;
|
||||
if (calPopup.visible) {
|
||||
calPopup.open = false;
|
||||
calCloseTimer.start();
|
||||
|
|
@ -841,6 +842,7 @@ in
|
|||
color: "transparent"
|
||||
|
||||
property bool open: false
|
||||
property bool justDismissed: false
|
||||
property real fullWidth: calCol.width + 32
|
||||
property real fullHeight: calCol.height + 24
|
||||
|
||||
|
|
@ -852,9 +854,17 @@ in
|
|||
open = true;
|
||||
} else {
|
||||
open = false;
|
||||
justDismissed = true;
|
||||
dismissGuardTimer.start();
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: dismissGuardTimer
|
||||
interval: 100
|
||||
onTriggered: calPopup.justDismissed = false
|
||||
}
|
||||
|
||||
// Concave corner — left
|
||||
Item {
|
||||
anchors.right: calContent.left
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue