@@ -23,6 +23,7 @@ import Ubuntu.Gestures 0.1
2323import Unity.Launcher 0.1
2424import LightDM 0.1 as LightDM
2525import Powerd 0.1
26+import SessionBroadcast 0.1
2627import "Dash"
2728import "Greeter"
2829import "Launcher"
@@ -543,6 +544,17 @@ FocusScope {
543544 }
544545 }
545546
547+ function showHome() {
548+ greeter.hide()
549+ // Animate if moving between application and dash
550+ if (!stages.shown) {
551+ dash.setCurrentScope("home.scope", true, false)
552+ } else {
553+ dash.setCurrentScope("home.scope", false, false)
554+ }
555+ stages.hide()
556+ }
557+
546558 Item {
547559 id: overlay
548560
@@ -630,16 +642,7 @@ FocusScope {
630642 width: parent.width
631643 dragAreaWidth: shell.edgeSize
632644 available: (!greeter.shown || greeter.narrowMode) && edgeDemo.launcherEnabled
633− onDashItemSelected: {
634− greeter.hide()
635− // Animate if moving between application and dash
636− if (!stages.shown) {
637− dash.setCurrentScope("home.scope", true, false)
638− } else {
639− dash.setCurrentScope("home.scope", false, false)
640− }
641− stages.hide();
642− }
645+ onDashItemSelected: showHome()
643646 onDash: {
644647 if (stages.shown) {
645648 dash.setCurrentScope("applications.scope", true, false)
@@ -747,4 +750,9 @@ FocusScope {
747750 indicators: panel.indicators
748751 underlay: underlay
749752 }
753+
754+ Connections {
755+ target: SessionBroadcast
756+ onShowHome: showHome()
757+ }
750758}