@@ -16,6 +16,7 @@
1616
1717import QtQuick 2.0
1818import QtMultimedia 5.0
19+import Powerd 0.1
1920import Ubuntu.Components 1.1
2021import Unity.Notifications 1.0
2122import QMenuModel 0.1
@@ -84,8 +85,16 @@ Item {
8485 source: hints["suppress-sound"] !== "true" && hints["sound-file"] !== undefined ? hints["sound-file"] : ""
8586 }
8687
87− // FIXME: using onCompleted because of LP: #1354406 workaround, has to be onOpacityChanged really
8888 Component.onCompleted: {
89+ // Turn on screen as needed (Powerd.Notification means the screen
90+ // stays on for a shorter amount of time)
91+ if (type == Notification.SnapDecision) {
92+ Powerd.setStatus(Powerd.On, Powerd.Unknown);
93+ } else if (type != Notification.Confirmation) {
94+ Powerd.setStatus(Powerd.On, Powerd.Notification);
95+ }
96+
97+ // FIXME: using onCompleted because of LP: #1354406 workaround, has to be onOpacityChanged really
8998 if (opacity == 1.0 && hints["suppress-sound"] !== "true" && sound.source !== "") {
9099 sound.play();
91100 }