quickshell: drop the focus grab before activating a notification's window
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
3d5ecb7b98
commit
99525c98ed
1 changed files with 17 additions and 2 deletions
|
|
@ -1483,7 +1483,15 @@ in
|
|||
// Invoking an action ("View", "Reply"…)
|
||||
// makes the app want focus, but it can't
|
||||
// take it itself — see focusNotifApp.
|
||||
onClicked: { modelData.invoke(); bar.focusNotifApp(_nc.notif); _nc.actionInvoked(); }
|
||||
// closeAllDropdowns first for the same
|
||||
// focus-grab reason as the list card; it's
|
||||
// a no-op for the toast, which has no grab.
|
||||
onClicked: {
|
||||
bar.closeAllDropdowns();
|
||||
modelData.invoke();
|
||||
bar.focusNotifApp(_nc.notif);
|
||||
_nc.actionInvoked();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -6084,10 +6092,17 @@ in
|
|||
MouseArea {
|
||||
anchors.fill: parent
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
// Close FIRST: the panel holds a
|
||||
// HyprlandFocusGrab, and tearing that
|
||||
// down refocuses whatever was focused
|
||||
// before — which undoes our activate if
|
||||
// it already ran. animateClose() drops
|
||||
// activeDropdown synchronously, so the
|
||||
// grab is gone before the next line.
|
||||
onClicked: {
|
||||
bar.closeAllDropdowns();
|
||||
bar.activateNotif(notifItem.modelData);
|
||||
notifItem.modelData.dismiss();
|
||||
bar.closeAllDropdowns();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue