on xenial help sign in
Make swwipe and home button press in the launcher dismiss the overview

Moved the logic that does not change the current scope on swipe from the shell to the dash

commitfb1e3ea90bb65301176385235f3408becf264979 authorAlbert Astals <albert.astals@canonical.com> dateTue 2 Sep 2014, 12:14 (12 years ago) parent551f5fd
7 files changed+16−10
plugins/Unity/DashCommunicator/dashcommunicator.cpp+2−2 plugins/Unity/DashCommunicator/dashcommunicator.h+1−1 plugins/Unity/DashCommunicator/dashcommunicatorservice.h+1−1 plugins/Unity/DashCommunicator/dbusdashcommunicatorservice.cpp+2−2 plugins/Unity/DashCommunicator/dbusdashcommunicatorservice.h+2−2 qml/Dash/Dash.qml+7−1 qml/Shell.qml+1−1
plugins/Unity/DashCommunicator/dashcommunicator.cpp+2−2
@@ -31,7 +31,7 @@ DashCommunicator::~DashCommunicator()
3131}
3232
3333
34−void DashCommunicator::setCurrentScope(const QString &scopeId, bool animate, bool reset)
34+void DashCommunicator::setCurrentScope(const QString &scopeId, bool animate, bool isSwipe)
3535{
3636 QDBusConnection connection = QDBusConnection::sessionBus();
3737 QDBusInterface dashIface ("com.canonical.UnityDash",
@@ -39,5 +39,5 @@ void DashCommunicator::setCurrentScope(const QString &scopeId, bool animate, boo
3939 "",
4040 connection);
4141
42− dashIface.call("SetCurrentScope", scopeId, animate, reset);
42+ dashIface.call("SetCurrentScope", scopeId, animate, isSwipe);
4343}
plugins/Unity/DashCommunicator/dashcommunicator.h+1−1
@@ -29,7 +29,7 @@ public:
2929 ~DashCommunicator();
3030
3131public Q_SLOTS:
32− void setCurrentScope(const QString &scopeId, bool animate, bool reset);
32+ void setCurrentScope(const QString &scopeId, bool animate, bool isSwipe);
3333};
3434
3535#endif
plugins/Unity/DashCommunicator/dashcommunicatorservice.h+1−1
@@ -29,7 +29,7 @@ public:
2929 ~DashCommunicatorService();
3030
3131Q_SIGNALS:
32− void setCurrentScopeRequested(const QString &scopeId, bool animate, bool reset);
32+ void setCurrentScopeRequested(const QString &scopeId, bool animate, bool isSwipe);
3333
3434private:
3535 DBusDashCommunicatorService *m_dbusService;
plugins/Unity/DashCommunicator/dbusdashcommunicatorservice.cpp+2−2
@@ -33,7 +33,7 @@ DBusDashCommunicatorService::~DBusDashCommunicatorService()
3333{
3434}
3535
36−void DBusDashCommunicatorService::SetCurrentScope(const QString &scopeId, bool animate, bool reset)
36+void DBusDashCommunicatorService::SetCurrentScope(const QString &scopeId, bool animate, bool isSwipe)
3737{
38− Q_EMIT setCurrentScopeRequested(scopeId, animate, reset);
38+ Q_EMIT setCurrentScopeRequested(scopeId, animate, isSwipe);
3939}
plugins/Unity/DashCommunicator/dbusdashcommunicatorservice.h+2−2
@@ -29,10 +29,10 @@ public:
2929 ~DBusDashCommunicatorService();
3030
3131Q_SIGNALS:
32− void setCurrentScopeRequested(const QString &scopeId, bool animate, bool reset);
32+ void setCurrentScopeRequested(const QString &scopeId, bool animate, bool isSwipe);
3333
3434public 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);
3636
3737};
3838
qml/Dash/Dash.qml+7−1
@@ -34,7 +34,13 @@ Showable {
3434 DashCommunicatorService {
3535 objectName: "dashCommunicatorService"
3636 onSetCurrentScopeRequested: {
37− dash.setCurrentScope(scopeId, animate, reset)
37+ if (!isSwipe || !window.active || overviewController.progress != 0) {
38+ dash.setCurrentScope(scopeId, animate, isSwipe)
39+ if (overviewController.progress != 0) {
40+ overviewController.enableAnimation = false;
41+ overviewController.progress = 0;
42+ }
43+ }
3844 }
3945 }
4046
qml/Shell.qml+1−1
@@ -535,7 +535,7 @@ Item {
535535 onShowDashHome: showHome()
536536 onDash: showDash()
537537 onDashSwipeChanged: {
538− if (dashSwipe && ApplicationManager.focusedApplicationId !== "unity8-dash") {
538+ if (dashSwipe) {
539539 dash.setCurrentScope("clickscope", false, true)
540540 }
541541 }