on xenial help sign in
dashActive -> forceDashActive
1813285Michael Zanetti
qml/Shell.qml+1−1
@@ -130,7 +130,7 @@ Item {
130
130
131 Binding {
131 Binding {
132 target: ApplicationManager
132 target: ApplicationManager
133− property: "dashActive"
133+ property: "forceDashActive"
134 value: launcher.shown || launcher.dashSwipe
134 value: launcher.shown || launcher.dashSwipe
135 }
135 }
136
136
tests/mocks/Unity/Application/ApplicationManager.cpp+8−8
@@ -43,7 +43,7 @@ ApplicationManager *ApplicationManager::singleton()
43ApplicationManager::ApplicationManager(QObject *parent)
43ApplicationManager::ApplicationManager(QObject *parent)
44 : ApplicationManagerInterface(parent)
44 : ApplicationManagerInterface(parent)
45 , m_suspended(false)
45 , m_suspended(false)
46− , m_dashActive(false)
46+ , m_forceDashActive(false)
47{
47{
48 m_roleNames.insert(RoleSession, "session");
48 m_roleNames.insert(RoleSession, "session");
49 m_roleNames.insert(RoleFullscreen, "fullscreen");
49 m_roleNames.insert(RoleFullscreen, "fullscreen");
@@ -293,20 +293,20 @@ void ApplicationManager::setSuspended(bool suspended)
293 Q_EMIT suspendedChanged();
293 Q_EMIT suspendedChanged();
294}
294}
295
295
296−bool ApplicationManager::dashActive() const
296+bool ApplicationManager::forceDashActive() const
297{
297{
298− return m_dashActive;
298+ return m_forceDashActive;
299}
299}
300
300
301−void ApplicationManager::setDashActive(bool dashActive)
301+void ApplicationManager::setForceDashActive(bool forceDashActive)
302{
302{
303− if (m_dashActive == dashActive) {
303+ if (m_forceDashActive == forceDashActive) {
304 return;
304 return;
305 }
305 }
306
306
307 ApplicationInfo *dash = findApplication("unity8-dash");
307 ApplicationInfo *dash = findApplication("unity8-dash");
308 if (dash) {
308 if (dash) {
309− if (dashActive) {
309+ if (forceDashActive) {
310 dash->setState(ApplicationInfo::Running);
310 dash->setState(ApplicationInfo::Running);
311 } else {
311 } else {
312 if (!dash->focused()) {
312 if (!dash->focused()) {
@@ -314,8 +314,8 @@ void ApplicationManager::setDashActive(bool dashActive)
314 }
314 }
315 }
315 }
316 }
316 }
317− m_dashActive = dashActive;
317+ m_forceDashActive = forceDashActive;
318− Q_EMIT dashActiveChanged();
318+ Q_EMIT forceDashActiveChanged();
319}
319}
320
320
321bool ApplicationManager::focusApplication(const QString &appId)
321bool ApplicationManager::focusApplication(const QString &appId)
tests/mocks/Unity/Application/ApplicationManager.h+3−3
@@ -102,8 +102,8 @@ class ApplicationManager : public ApplicationManagerInterface {
102 bool suspended() const override;
102 bool suspended() const override;
103 void setSuspended(bool suspended) override;
103 void setSuspended(bool suspended) override;
104
104
105− bool dashActive() const override;
105+ bool forceDashActive() const override;
106− void setDashActive(bool dashActive) override;
106+ void setForceDashActive(bool forceDashActive) override;
107
107
108 // Only for testing
108 // Only for testing
109 Q_INVOKABLE QStringList availableApplications();
109 Q_INVOKABLE QStringList availableApplications();
@@ -127,7 +127,7 @@ class ApplicationManager : public ApplicationManagerInterface {
127 void buildListOfAvailableApplications();
127 void buildListOfAvailableApplications();
128 void onWindowCreated();
128 void onWindowCreated();
129 bool m_suspended;
129 bool m_suspended;
130− bool m_dashActive;
130+ bool m_forceDashActive;
131 QList<ApplicationInfo*> m_runningApplications;
131 QList<ApplicationInfo*> m_runningApplications;
132 QList<ApplicationInfo*> m_availableApplications;
132 QList<ApplicationInfo*> m_availableApplications;
133 QTimer m_windowCreatedTimer;
133 QTimer m_windowCreatedTimer;