aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBocklage, Jens <Jens_Bocklage@mentor.com>2016-11-09 16:14:53 +0100
committerBocklage, Jens <Jens_Bocklage@mentor.com>2016-11-09 16:14:53 +0100
commit557bdea00ff9a398f0646fdcae653791c9cb640c (patch)
treed673bd8891346d67ad9bac959c500752c9d917ca
parent61d3f0e1e2210d6108953b0433324a3365d9dab6 (diff)
Fix for AppInfo member initialization.
Only one Layout for CES2017 needed. Signed-off-by: Bocklage, Jens <Jens_Bocklage@mentor.com>
-rw-r--r--HomeScreen/src/layouthandler.cpp56
-rw-r--r--WindowManager/src/windowmanager.cpp6
-rw-r--r--interfaces/src/appframework.cpp16
3 files changed, 33 insertions, 45 deletions
diff --git a/HomeScreen/src/layouthandler.cpp b/HomeScreen/src/layouthandler.cpp
index 11dd2cb..80f6cd1 100644
--- a/HomeScreen/src/layouthandler.cpp
+++ b/HomeScreen/src/layouthandler.cpp
@@ -54,6 +54,7 @@ void LayoutHandler::setUpLayouts()
const int CONTROLBAR_Y = SCREEN_HEIGHT - CONTROLBAR_HEIGHT;
+ // only one Layout for CES2017 needed
// layout 1:
// one app surface, statusbar, control bar
surfaceArea.x = 0;
@@ -65,7 +66,7 @@ void LayoutHandler::setUpLayouts()
mp_dBusWindowManagerProxy->addLayout(1, "one app", surfaceAreas);
-
+ /*
surfaceAreas.clear();
// layout 2:
@@ -111,7 +112,7 @@ void LayoutHandler::setUpLayouts()
surfaceAreas.append(surfaceArea);
- mp_dBusWindowManagerProxy->addLayout(3, "side by side", surfaceAreas);
+ mp_dBusWindowManagerProxy->addLayout(3, "side by side", surfaceAreas);*/
}
void LayoutHandler::showAppLayer()
@@ -165,35 +166,29 @@ void LayoutHandler::checkToDoQueue()
if (0 != allSurfaces.size())
{
- m_requestsToBeVisibleSurfaces.append(allSurfaces.at(0));
+ if (-1 == m_visibleSurfaces.indexOf(allSurfaces.at(0)))
+ {
+ qDebug("already visible");
+ }
+ if (-1 == m_invisibleSurfaces.indexOf(allSurfaces.at(0)))
+ {
+ m_invisibleSurfaces.removeAt(m_invisibleSurfaces.indexOf(allSurfaces.at(0)));
+ }
+ if (-1 == m_requestsToBeVisibleSurfaces.indexOf(allSurfaces.at(0)))
+ {
+ m_requestsToBeVisibleSurfaces.append(allSurfaces.at(0));
+ }
qDebug("m_visibleSurfaces %d", m_visibleSurfaces.size());
qDebug("m_invisibleSurfaces %d", m_invisibleSurfaces.size());
qDebug("m_requestsToBeVisibleSurfaces %d", m_requestsToBeVisibleSurfaces.size());
- QList<int> availableLayouts = mp_dBusWindowManagerProxy->getAvailableLayouts(m_visibleSurfaces.size() + m_requestsToBeVisibleSurfaces.size());
- if (0 == availableLayouts.size())
- {
- // no layout fits the need!
- // replace the last app
- qDebug("no layout fits the need!");
- qDebug("replace the last surface");
-
- m_invisibleSurfaces.append(m_visibleSurfaces.last());
- m_visibleSurfaces.removeLast();
-
- m_visibleSurfaces.append(m_requestsToBeVisibleSurfaces);
- m_requestsToBeVisibleSurfaces.clear();
-
- for (int i = 0; i < m_visibleSurfaces.size(); ++i)
- {
- mp_dBusWindowManagerProxy->setSurfaceToLayoutArea(m_visibleSurfaces.at(i), i);
- }
- }
+ QList<int> availableLayouts = mp_dBusWindowManagerProxy->getAvailableLayouts(1); // one app only for CES2017
if (1 == availableLayouts.size())
{
- // switch to new layout
- qDebug("switch to new layout %d", availableLayouts.at(0));
+ qDebug("active layout: %d", availableLayouts.at(0));
+ m_invisibleSurfaces.append(m_visibleSurfaces);
+ m_visibleSurfaces.clear();
m_visibleSurfaces.append(m_requestsToBeVisibleSurfaces);
m_requestsToBeVisibleSurfaces.clear();
@@ -203,18 +198,9 @@ void LayoutHandler::checkToDoQueue()
mp_dBusWindowManagerProxy->setSurfaceToLayoutArea(m_visibleSurfaces.at(i), i);
}
}
- if (1 < availableLayouts.size())
+ else
{
- // more than one layout possible! Ask user.
- qDebug("more than one layout possible! Ask user.");
-
- QStringList choices;
- for (int i = 0; i < availableLayouts.size(); ++i)
- {
- choices.append(mp_dBusWindowManagerProxy->getLayoutName(availableLayouts.at(i)));
- }
-
- mp_dBusPopupProxy->showPopupComboBox("Select Layout", choices);
+ qDebug("this should not happen!?");
}
}
}
diff --git a/WindowManager/src/windowmanager.cpp b/WindowManager/src/windowmanager.cpp
index 48f8d38..1c0ddea 100644
--- a/WindowManager/src/windowmanager.cpp
+++ b/WindowManager/src/windowmanager.cpp
@@ -28,8 +28,9 @@
// On top all applications in one layer.
// On top of that, the popup layer.
#define WINDOWMANAGER_LAYER_POPUP 100
-#define WINDOWMANAGER_LAYER_APPLICATIONS 101
-#define WINDOWMANAGER_LAYER_HOMESCREEN 102
+#define WINDOWMANAGER_LAYER_HOMESCREEN_OVERLAY 101
+#define WINDOWMANAGER_LAYER_APPLICATIONS 102
+#define WINDOWMANAGER_LAYER_HOMESCREEN 103
#define WINDOWMANAGER_LAYER_NUM 3
@@ -353,6 +354,7 @@ void WindowManager::surfaceCallbackFunction_non_static(t_ilm_surface surface,
if (ILM_NOTIFICATION_CONTENT_AVAILABLE & mask)
{
qDebug("ILM_NOTIFICATION_CONTENT_AVAILABLE");
+ updateScreen();
}
if (ILM_NOTIFICATION_CONTENT_REMOVED & mask)
{
diff --git a/interfaces/src/appframework.cpp b/interfaces/src/appframework.cpp
index 40515d5..15c57c0 100644
--- a/interfaces/src/appframework.cpp
+++ b/interfaces/src/appframework.cpp
@@ -28,14 +28,14 @@ AppInfo::~AppInfo()
void AppInfo::read(const QJsonObject &json)
{
id = json["id"].toString();
- version = json["id"].toString();
- width = json["id"].toInt();
- height = json["id"].toInt();
- name = json["id"].toString();
- description = json["id"].toString();
- shortname = json["id"].toString();
- author = json["id"].toString();
- iconPath = json["id"].toString();
+ version = json["version"].toString();
+ width = json["width"].toInt();
+ height = json["height"].toInt();
+ name = json["name"].toString();
+ description = json["description"].toString();
+ shortname = json["shortname"].toString();
+ author = json["author"].toString();
+ iconPath = json["iconPath"].toString();
}
QDBusArgument &operator <<(QDBusArgument &argument, const AppInfo &mAppInfo)