Remove windowmanager depends 50/24850/1 9.99.1 9.99.2 9.99.3 9.99.4 jellyfish/9.99.1 jellyfish/9.99.2 jellyfish/9.99.3 jellyfish/9.99.4 jellyfish_9.99.1 jellyfish_9.99.2 jellyfish_9.99.3 jellyfish_9.99.4
authorMarius Vlad <marius.vlad@collabora.com>
Fri, 15 May 2020 15:52:41 +0000 (18:52 +0300)
committerMarius Vlad <marius.vlad@collabora.com>
Wed, 24 Jun 2020 14:59:52 +0000 (17:59 +0300)
Bug-AGL: SPEC-3447

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ic4091cfb662125522dd9ff373cc57fbff5fa676a

CMakeLists.txt
config.xml.in
main.cpp

index 9b8ff97..7b6a2fa 100644 (file)
@@ -26,7 +26,6 @@ pkg_check_modules(JSON REQUIRED json-c)
 pkg_check_modules(QT5_WIDGETS REQUIRED Qt5Widgets)
 pkg_check_modules(QT5_NETWORK REQUIRED Qt5Network)
 pkg_check_modules(LIBQTAPPFW REQUIRED qtappfw-navigation)
-pkg_check_modules(QLIBWIN REQUIRED qlibwindowmanager)
 pkg_check_modules(LIBHS REQUIRED libhomescreen)
 
 
@@ -38,7 +37,7 @@ qt5_wrap_cpp(yelp_client_SRC MainApp.h InfoPanelLabel.h ClickableLabel.h Keyboar
 QT5_ADD_RESOURCES(yelp_client_QRC yelp-client.qrc)
 add_executable( yelp-client main.cpp MainApp.cpp InfoPanel.cpp InfoPanelLabel.cpp Keyboard.cpp yelp-client.qrc ${yelp_client_SRC} ${yelp_client_QRC})
 #target_link_libraries( yelp-client binderclient )
-target_link_libraries( yelp-client ${LIBQTAPPFW_LIBRARIES} ${JSON_LIBRARIES} ${QLIBWIN_LIBRARIES} ${LIBHS_LIBRARIES} )
+target_link_libraries( yelp-client ${LIBQTAPPFW_LIBRARIES} ${JSON_LIBRARIES} ${LIBHS_LIBRARIES} )
 qt5_use_modules(yelp-client Core Widgets Network)
 
 install (TARGETS yelp-client DESTINATION bin)
index a20cdef..f849970 100644 (file)
@@ -7,7 +7,6 @@
   <author>AISIN AW</author>
   <feature name="urn:AGL:widget:required-api">
     <param name="navigation" value="ws" />
-    <param name="windowmanager" value="ws" />
     <param name="homescreen" value="ws" />
   </feature>
   <feature name="urn:AGL:widget:required-permission">
index 8bf8b51..a82198a 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -4,28 +4,15 @@
 #include <getopt.h>
 
 #include <libhomescreen.hpp>
-#include <qlibwindowmanager.h>
-
 #include <navigation.h>
 
 #define DEFAULT_CREDENTIALS_FILE "/etc/poikey"
 
 using namespace std;
 
-static QLibWindowmanager* qwm;
-static LibHomeScreen* hs;
 static QString graphic_role;
 static MainApp *mainapp;
-
-static void SyncDrawHandler(json_object *object)
-{
-    qwm->endDraw(graphic_role);
-}
-
-static void ShowWindowHandler(json_object *object)
-{
-    qwm->activateWindow(graphic_role);
-}
+static LibHomeScreen* hs;
 
 // Callback to drive raising navigation app
 static void NavWindowRaiseHandler(void)
@@ -35,14 +22,20 @@ static void NavWindowRaiseHandler(void)
     }
 }
 
+static void ShowWindowHandler(json_object *object)
+{
+
+}
+
 int main(int argc, char *argv[], char *env[])
 {
     int opt;
     QApplication a(argc, argv);
     QString credentialsFile(DEFAULT_CREDENTIALS_FILE);
-    qwm = new QLibWindowmanager();
+
     hs = new LibHomeScreen();
     graphic_role = QString("poi");
+    a.setDesktopFileName(graphic_role);
 
     QString pt = QString(argv[1]);
     int port = pt.toInt();
@@ -58,23 +51,8 @@ int main(int argc, char *argv[], char *env[])
     query.addQueryItem(QStringLiteral("token"), secret);
     bindingAddress.setQuery(query);
 
-    if (qwm->init(port, secret) != 0) {
-        exit(EXIT_FAILURE);
-    }
-
-    if (qwm->requestSurface(graphic_role) != 0) {
-        cerr << "Error: wm check failed" << endl;
-        exit(EXIT_FAILURE);
-    }
-
-    qwm->set_event_handler(QLibWindowmanager::Event_SyncDraw, SyncDrawHandler);
-
     mainapp = new MainApp(new Navigation(bindingAddress));
 
-    hs->init(port, token.c_str());
-
-    hs->set_event_handler(LibHomeScreen::Event_ShowWindow, ShowWindowHandler);
-
     // force setting
     mainapp->setInfoScreen(true);
     mainapp->setKeyboard(true);
@@ -82,6 +60,9 @@ int main(int argc, char *argv[], char *env[])
     // hook up callback to start/raise navigation app
     mainapp->setNavWindowRaiseCallback(NavWindowRaiseHandler);
 
+    hs->init(port, token.c_str());
+    hs->set_event_handler(LibHomeScreen::Event_ShowWindow, ShowWindowHandler);
+
     /* then, authenticate connexion to POI service: */
     if (mainapp->AuthenticatePOI(credentialsFile) < 0)
     {
@@ -95,8 +76,6 @@ int main(int argc, char *argv[], char *env[])
     if (mainapp->StartMonitoringUserInput() < 0)
         return -1;
 
-    qwm->activateWindow(graphic_role);
-
     /* main loop: */
     return a.exec();
 }