diff options
author | Jens Bocklage <jens_bocklage@mentor.com> | 2016-12-14 07:44:25 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@automotivelinux.org> | 2016-12-14 07:44:25 +0000 |
commit | b0632b0a5cd7e31c79c4a81764ebed329114a983 (patch) | |
tree | a408c5c485dc05514477afd5b8fa029a6f496b23 /HomeScreen | |
parent | 87a370594448b73a28ee8a8b783873cbefbc8e10 (diff) | |
parent | 57e18aeaf2a9ae292af7559580f8154527fc04f5 (diff) |
Merge "Fix and improve switching applications"
Diffstat (limited to 'HomeScreen')
-rw-r--r-- | HomeScreen/qml/Home.qml | 2 | ||||
-rw-r--r-- | HomeScreen/qml/ShortcutArea.qml | 2 | ||||
-rw-r--r-- | HomeScreen/src/layouthandler.cpp | 11 | ||||
-rw-r--r-- | HomeScreen/src/layouthandler.h | 4 | ||||
-rw-r--r-- | HomeScreen/src/main.cpp | 2 | ||||
-rw-r--r-- | HomeScreen/src/mainwindow.cpp | 2 | ||||
-rw-r--r-- | HomeScreen/src2/applicationmodel.cpp | 2 |
7 files changed, 15 insertions, 10 deletions
diff --git a/HomeScreen/qml/Home.qml b/HomeScreen/qml/Home.qml index 3c8f109..301fdbd 100644 --- a/HomeScreen/qml/Home.qml +++ b/HomeScreen/qml/Home.qml @@ -55,7 +55,7 @@ Item { applicationArea.visible = true appLauncherAreaLauncher.visible = false - layoutHandler.showAppLayer() + layoutHandler.showAppLayer(pid) } else { console.warn("app cannot be launched!") diff --git a/HomeScreen/qml/ShortcutArea.qml b/HomeScreen/qml/ShortcutArea.qml index 684b845..aeaf097 100644 --- a/HomeScreen/qml/ShortcutArea.qml +++ b/HomeScreen/qml/ShortcutArea.qml @@ -70,7 +70,7 @@ Item { applicationArea.visible = true appLauncherAreaLauncher.visible = false layoutHandler.makeMeVisible(pid) - layoutHandler.showAppLayer() + layoutHandler.showAppLayer(pid) } else { console.warn("app cannot be launched!") diff --git a/HomeScreen/src/layouthandler.cpp b/HomeScreen/src/layouthandler.cpp index 4738f8e..3c6eb5c 100644 --- a/HomeScreen/src/layouthandler.cpp +++ b/HomeScreen/src/layouthandler.cpp @@ -70,10 +70,9 @@ LayoutHandler::~LayoutHandler() delete mp_dBusWindowManagerProxy; } -void LayoutHandler::showAppLayer() +void LayoutHandler::showAppLayer(int pid) { - // POPUP=0, HOMESCREEN_OVERLAY=1, APPS=2, HOMESCREEN=3 - mp_dBusWindowManagerProxy->showLayer(2); // TODO: enum + mp_dBusWindowManagerProxy->showAppLayer(pid); } void LayoutHandler::hideAppLayer() @@ -86,6 +85,7 @@ void LayoutHandler::makeMeVisible(int pid) { qDebug("makeMeVisible %d", pid); +#if 0 // if app does not request to be visible if (-1 == m_requestsToBeVisiblePids.indexOf(pid)) { @@ -103,10 +103,12 @@ void LayoutHandler::makeMeVisible(int pid) { checkToDoQueue(); } +#endif } void LayoutHandler::checkToDoQueue() { +#if 0 if ((-1 != m_secondsTimerId) && (0 == m_requestsToBeVisiblePids.size())) { killTimer(m_secondsTimerId); @@ -181,14 +183,17 @@ void LayoutHandler::checkToDoQueue() } } } +#endif } +#if 0 QList<int> LayoutHandler::requestGetAllSurfacesOfProcess(int pid) { qDebug("requestGetAllSurfacesOfProcess %d", pid); return mp_dBusWindowManagerProxy->getAllSurfacesOfProcess(pid); } +#endif int LayoutHandler::requestGetSurfaceStatus(int surfaceId) { diff --git a/HomeScreen/src/layouthandler.h b/HomeScreen/src/layouthandler.h index 9ca0a9f..e3c0246 100644 --- a/HomeScreen/src/layouthandler.h +++ b/HomeScreen/src/layouthandler.h @@ -15,13 +15,13 @@ public: signals: public slots: - void showAppLayer(); + void showAppLayer(int pid); void hideAppLayer(); void makeMeVisible(int pid); private: void checkToDoQueue(); public slots: - QList<int> requestGetAllSurfacesOfProcess(int pid); + // QList<int> requestGetAllSurfacesOfProcess(int pid); int requestGetSurfaceStatus(int surfaceId); void requestRenderSurfaceToArea(int surfaceId, int layoutArea); bool requestRenderSurfaceToAreaAllowed(int surfaceId, int layoutArea); diff --git a/HomeScreen/src/main.cpp b/HomeScreen/src/main.cpp index 3cf8e8c..c1f951e 100644 --- a/HomeScreen/src/main.cpp +++ b/HomeScreen/src/main.cpp @@ -51,7 +51,7 @@ int main(int argc, char *argv[]) LayoutHandler* layoutHandler = new LayoutHandler(); HomeScreenControlInterface* hsci = new HomeScreenControlInterface(); - QObject::connect(hsci, SIGNAL(newRequestGetAllSurfacesOfProcess(int)), layoutHandler, SLOT(requestGetAllSurfacesOfProcess(int))); + // QObject::connect(hsci, SIGNAL(newRequestGetAllSurfacesOfProcess(int)), layoutHandler, SLOT(requestGetAllSurfacesOfProcess(int))); QObject::connect(hsci, SIGNAL(newRequestGetSurfaceStatus(int)), layoutHandler, SLOT(requestGetSurfaceStatus(int))); QObject::connect(hsci, SIGNAL(newRequestsToBeVisibleApp(int)), layoutHandler, SLOT(makeMeVisible(int))); QObject::connect(hsci, SIGNAL(newRequestRenderSurfaceToArea(int, int)), layoutHandler, SLOT(requestRenderSurfaceToArea(int,int))); diff --git a/HomeScreen/src/mainwindow.cpp b/HomeScreen/src/mainwindow.cpp index 0bf4b5c..6e4ec92 100644 --- a/HomeScreen/src/mainwindow.cpp +++ b/HomeScreen/src/mainwindow.cpp @@ -102,7 +102,7 @@ MainWindow::MainWindow(QWidget *parent) : //mp_layoutHandler->setUpLayouts(); mp_homeScreenControlInterface = new HomeScreenControlInterface(this); - QObject::connect(mp_homeScreenControlInterface, SIGNAL(newRequestGetAllSurfacesOfProcess(int)), mp_layoutHandler, SLOT(requestGetAllSurfacesOfProcess(int))); + // QObject::connect(mp_homeScreenControlInterface, SIGNAL(newRequestGetAllSurfacesOfProcess(int)), mp_layoutHandler, SLOT(requestGetAllSurfacesOfProcess(int))); QObject::connect(mp_homeScreenControlInterface, SIGNAL(newRequestGetSurfaceStatus(int)), mp_layoutHandler, SLOT(requestGetSurfaceStatus(int))); QObject::connect(mp_homeScreenControlInterface, SIGNAL(newRequestsToBeVisibleApp(int)), mp_layoutHandler, SLOT(makeMeVisible(int))); QObject::connect(mp_homeScreenControlInterface, SIGNAL(newRequestRenderSurfaceToArea(int, int)), mp_layoutHandler, SLOT(requestRenderSurfaceToArea(int,int))); diff --git a/HomeScreen/src2/applicationmodel.cpp b/HomeScreen/src2/applicationmodel.cpp index b8bbb38..2a16ace 100644 --- a/HomeScreen/src2/applicationmodel.cpp +++ b/HomeScreen/src2/applicationmodel.cpp @@ -45,7 +45,7 @@ ApplicationModel::Private::Private(ApplicationModel *parent) data.append(AppInfo(QStringLiteral("Navigation"), QStringLiteral("NAVIGATION"), QStringLiteral("navigation@0.1"))); data.append(AppInfo(QStringLiteral("Phone"), QStringLiteral("PHONE"), QStringLiteral("phone@0.1"))); data.append(AppInfo(QStringLiteral("Radio"), QStringLiteral("RADIO"), QStringLiteral("radio@0.1"))); - data.append(AppInfo(QStringLiteral("Multimedia"), QStringLiteral("MULTIMEDIA"), QStringLiteral("multimedia@0.1"))); + data.append(AppInfo(QStringLiteral("Multimedia"), QStringLiteral("MULTIMEDIA"), QStringLiteral("mediaplayer@0.1"))); data.append(AppInfo(QStringLiteral("Connectivity"), QStringLiteral("CONNECTIVITY"), QStringLiteral("connectivity@0.1"))); data.append(AppInfo(QStringLiteral("Dashboard"), QStringLiteral("DASHBOARD"), QStringLiteral("dashboard@0.1"))); data.append(AppInfo(QStringLiteral("Settings"), QStringLiteral("SETTINGS"), QStringLiteral("settings@0.1"))); |