on xenial help sign in
Make swwipe and home button press in the launcher dismiss the overview
fb1e3eaAlbert Astals
plugins/Unity/DashCommunicator/dashcommunicator.cpp+2−2
@@ -31,7 +31,7 @@ DashCommunicator::~DashCommunicator()
31}
31}
32
32
33
33
34−void DashCommunicator::setCurrentScope(const QString &scopeId, bool animate, bool reset)
34+void DashCommunicator::setCurrentScope(const QString &scopeId, bool animate, bool isSwipe)
35{
35{
36 QDBusConnection connection = QDBusConnection::sessionBus();
36 QDBusConnection connection = QDBusConnection::sessionBus();
37 QDBusInterface dashIface ("com.canonical.UnityDash",
37 QDBusInterface dashIface ("com.canonical.UnityDash",
@@ -39,5 +39,5 @@ void DashCommunicator::setCurrentScope(const QString &scopeId, bool animate, boo
39 "",
39 "",
40 connection);
40 connection);
41
41
42− dashIface.call("SetCurrentScope", scopeId, animate, reset);
42+ dashIface.call("SetCurrentScope", scopeId, animate, isSwipe);
43}
43}
plugins/Unity/DashCommunicator/dashcommunicator.h+1−1
@@ -29,7 +29,7 @@ public:
29 ~DashCommunicator();
29 ~DashCommunicator();
30
30
31public Q_SLOTS:
31public Q_SLOTS:
32− void setCurrentScope(const QString &scopeId, bool animate, bool reset);
32+ void setCurrentScope(const QString &scopeId, bool animate, bool isSwipe);
33};
33};
34
34
35#endif
35#endif
plugins/Unity/DashCommunicator/dashcommunicatorservice.h+1−1
@@ -29,7 +29,7 @@ public:
29 ~DashCommunicatorService();
29 ~DashCommunicatorService();
30
30
31Q_SIGNALS:
31Q_SIGNALS:
32− void setCurrentScopeRequested(const QString &scopeId, bool animate, bool reset);
32+ void setCurrentScopeRequested(const QString &scopeId, bool animate, bool isSwipe);
33
33
34private:
34private:
35 DBusDashCommunicatorService *m_dbusService;
35 DBusDashCommunicatorService *m_dbusService;
plugins/Unity/DashCommunicator/dbusdashcommunicatorservice.cpp+2−2
@@ -33,7 +33,7 @@ DBusDashCommunicatorService::~DBusDashCommunicatorService()
33{
33{
34}
34}
35
35
36−void DBusDashCommunicatorService::SetCurrentScope(const QString &scopeId, bool animate, bool reset)
36+void DBusDashCommunicatorService::SetCurrentScope(const QString &scopeId, bool animate, bool isSwipe)
37{
37{
38− Q_EMIT setCurrentScopeRequested(scopeId, animate, reset);
38+ Q_EMIT setCurrentScopeRequested(scopeId, animate, isSwipe);
39}
39}
plugins/Unity/DashCommunicator/dbusdashcommunicatorservice.h+2−2
@@ -29,10 +29,10 @@ public:
29 ~DBusDashCommunicatorService();
29 ~DBusDashCommunicatorService();
30
30
31Q_SIGNALS:
31Q_SIGNALS:
32− void setCurrentScopeRequested(const QString &scopeId, bool animate, bool reset);
32+ void setCurrentScopeRequested(const QString &scopeId, bool animate, bool isSwipe);
33
33
34public Q_SLOTS:
34public Q_SLOTS:
35− Q_SCRIPTABLE void SetCurrentScope(const QString &scopeId, bool animate, bool reset);
35+ Q_SCRIPTABLE void SetCurrentScope(const QString &scopeId, bool animate, bool isSwipe);
36
36
37};
37};
38
38
qml/Dash/Dash.qml+7−1
@@ -34,7 +34,13 @@ Showable {
34 DashCommunicatorService {
34 DashCommunicatorService {
35 objectName: "dashCommunicatorService"
35 objectName: "dashCommunicatorService"
36 onSetCurrentScopeRequested: {
36 onSetCurrentScopeRequested: {
37+ if (!isSwipe || !window.active || overviewController.progress != 0) {
37− dash.setCurrentScope(scopeId, animate, reset)
38+ dash.setCurrentScope(scopeId, animate, isSwipe)
39+ if (overviewController.progress != 0) {
40+ overviewController.enableAnimation = false;
41+ overviewController.progress = 0;
42+ }
43+ }
38 }
44 }
39 }
45 }
40
46
qml/Shell.qml+1−1
@@ -535,7 +535,7 @@ Item {
535 onShowDashHome: showHome()
535 onShowDashHome: showHome()
536 onDash: showDash()
536 onDash: showDash()
537 onDashSwipeChanged: {
537 onDashSwipeChanged: {
538− if (dashSwipe && ApplicationManager.focusedApplicationId !== "unity8-dash") {
538+ if (dashSwipe) {
539 dash.setCurrentScope("clickscope", false, true)
539 dash.setCurrentScope("clickscope", false, true)
540 }
540 }
541 }
541 }