on xenial help sign in
Also use modal nature of snap-decision notifications when greeter/lockscreen is shown. This fixes LP: #1378827. Fixes: 1378827
c67350fMirco Müller
qml/Shell.qml+1−1
@@ -720,7 +720,7 @@ Item {
720 Rectangle {
720 Rectangle {
721 id: modalNotificationBackground
721 id: modalNotificationBackground
722
722
723− visible: notifications.useModal && !greeter.shown && (notifications.state == "narrow")
723+ visible: notifications.useModal && (notifications.state == "narrow")
724 color: "#000000"
724 color: "#000000"
725 anchors.fill: parent
725 anchors.fill: parent
726 opacity: 0.9
726 opacity: 0.9
tests/autopilot/unity8/shell/tests/test_notifications.py+6−5
@@ -248,7 +248,7 @@ class InteractiveNotificationBase(NotificationsBase):
248 self.assert_notification_action_id_was_called("action_accept")
248 self.assert_notification_action_id_was_called("action_accept")
249
249
250 def test_modal_sd_without_greeter(self):
250 def test_modal_sd_without_greeter(self):
251− """Snap-decision should block input to shell without greeter."""
251+ """Snap-decision should block input to shell without greeter/lockscreen."""
252 unity_proxy = self.launch_unity()
252 unity_proxy = self.launch_unity()
253 unlock_unity(unity_proxy)
253 unlock_unity(unity_proxy)
254
254
@@ -295,7 +295,7 @@ class InteractiveNotificationBase(NotificationsBase):
295 self.assert_notification_action_id_was_called("action_accept")
295 self.assert_notification_action_id_was_called("action_accept")
296
296
297 def test_modal_sd_with_greeter(self):
297 def test_modal_sd_with_greeter(self):
298− """A snap-decision should not block input to the greeter beneath it."""
298+ """A snap-decision should block input to the greeter/lockscreen beneath it."""
299 self.launch_unity()
299 self.launch_unity()
300
300
301 summary = "Incoming file"
301 summary = "Incoming file"
@@ -322,11 +322,12 @@ class InteractiveNotificationBase(NotificationsBase):
322 hints
322 hints
323 )
323 )
324
324
325− # verify that we can swipe away the greeter (interact with the "shell")
325+ # verify that we cannot reveal the launcher (no longer interact with
326+ # the shell)
326 time.sleep(1)
327 time.sleep(1)
327 self.main_window.show_dash_swiping()
328 self.main_window.show_dash_swiping()
328− greeter = self.main_window.get_greeter()
329− self.assertThat(greeter.shown, Eventually(Equals(False)))
329+ self.assertThat(
330+ self.main_window.is_launcher_open, Eventually(Equals(False)))
330
331
331 # verify and interact with the triggered snap-decision notification
332 # verify and interact with the triggered snap-decision notification
332 notify_list = self._get_notifications_list()
333 notify_list = self._get_notifications_list()