@@ -40,7 +40,6 @@ StyledItem {
4040 property bool fullscreen: false
4141 property int maxHeight
4242 property int margins: units.gu(1)
43− readonly property bool draggable: type !== Notification.SnapDecision || state === "contracted"
4443
4544 readonly property real defaultOpacity: 1.0
4645 property bool hasMouse
@@ -99,8 +98,14 @@ StyledItem {
9998 }
10099 }
101100
101+ function closeNotification() {
102+ if (notification.actions.count > 1) { // perform the "reject" action
103+ notification.notification.invokeAction(notification.actions.data(1, ActionModel.RoleActionId));
104+ }
105+ notification.notification.close();
106+ }
107+
102108 Behavior on x {
103− enabled: draggable
104109 UbuntuNumberAnimation { easing.type: Easing.OutBounce }
105110 }
106111
@@ -153,8 +158,8 @@ StyledItem {
153158 }
154159
155160 onXChanged: {
156− if (draggable && Math.abs(notification.x) > 0.75 * notification.width) {
157− notification.notification.close()
161+ if (Math.abs(notification.x) > 0.75 * notification.width) {
162+ closeNotification();
158163 }
159164 }
160165
@@ -194,7 +199,7 @@ StyledItem {
194199 anchors.fill: parent
195200 objectName: "interactiveArea"
196201
197− drag.target: draggable ? notification : undefined
202+ drag.target: notification
198203 drag.axis: Drag.XAxis
199204 drag.minimumX: -notification.width
200205 drag.maximumX: notification.width
@@ -221,16 +226,17 @@ StyledItem {
221226 width: units.gu(2)
222227 height: width
223228 radius: width / 2
224− visible: hasMouse && draggable && (containsMouse || interactiveArea.containsMouse)
229+ visible: hasMouse && (containsMouse || interactiveArea.containsMouse)
225230 iconName: "close"
226231 outline: false
232+ hoverEnabled: true
227233 color: theme.palette.normal.negative
228234 anchors.horizontalCenter: parent.left
229235 anchors.horizontalCenterOffset: notification.parent.state === "narrow" ? notification.margins / 2 : 0
230236 anchors.verticalCenter: parent.top
231237 anchors.verticalCenterOffset: notification.parent.state === "narrow" ? notification.margins / 2 : 0
232238
233− onClicked: notification.notification.close()
239+ onClicked: closeNotification();
234240 }
235241
236242 Column {