@@ -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"
@@ -545,6 +546,17 @@ FocusScope {
545546 }
546547 }
547548
549+ function showHome() {
550+ greeter.hide()
551+ // Animate if moving between application and dash
552+ if (!stages.shown) {
553+ dash.setCurrentScope("home.scope", true, false)
554+ } else {
555+ dash.setCurrentScope("home.scope", false, false)
556+ }
557+ stages.hide()
558+ }
559+
548560 Item {
549561 id: overlay
550562
@@ -632,16 +644,7 @@ FocusScope {
632644 width: parent.width
633645 dragAreaWidth: shell.edgeSize
634646 available: (!greeter.shown || greeter.narrowMode) && edgeDemo.launcherEnabled
635− onDashItemSelected: {
636− greeter.hide()
637− // Animate if moving between application and dash
638− if (!stages.shown) {
639− dash.setCurrentScope("home.scope", true, false)
640− } else {
641− dash.setCurrentScope("home.scope", false, false)
642− }
643− stages.hide();
644− }
647+ onDashItemSelected: showHome()
645648 onDash: {
646649 if (stages.shown) {
647650 dash.setCurrentScope("applications.scope", true, false)
@@ -749,4 +752,9 @@ FocusScope {
749752 indicators: panel.indicators
750753 underlay: underlay
751754 }
755+
756+ Connections {
757+ target: SessionBroadcast
758+ onShowHome: showHome()
759+ }
752760}