[Notifications] Invoke default action on drag enter

wilder-5.26
Kai Uwe Broulik 4 years ago
parent 4a0ed516b7
commit 83bcdab0aa
  1. 18
      applets/notifications/package/contents/ui/NotificationPopup.qml

@ -114,6 +114,24 @@ PlasmaCore.Dialog {
onPressed: wantsFocus = true
onContainsMouseChanged: wantsFocus = wantsFocus && containsMouse
DropArea {
anchors.fill: parent
onEntered: {
if (notificationPopup.hasDefaultAction) {
dragActivationTimer.start();
} else {
drag.accepted = false;
}
}
}
Timer {
id: dragActivationTimer
interval: 250 // same as Task Manager
repeat: false
onTriggered: notificationPopup.defaultActionInvoked()
}
// Visual flourish for critical notifications to make them stand out more
Rectangle {
id: criticalNotificationLine

Loading…
Cancel
Save