change hs to qhs sandbox/zheng_wenlong/als2019
authorzheng_wenlong <wenlong_zheng@nexty-ele.com>
Fri, 7 Jun 2019 03:19:31 +0000 (12:19 +0900)
committerzheng_wenlong <wenlong_zheng@nexty-ele.com>
Fri, 7 Jun 2019 03:19:31 +0000 (12:19 +0900)
app/CMakeLists.txt
app/main.cpp
conf.d/cmake/config.cmake

index 0259a79..51f4e97 100644 (file)
@@ -59,7 +59,7 @@ target_link_libraries(mixer
 
 if(NOT NATIVE_BUILD)
     target_link_libraries(mixer
-        homescreen
+        qthomescreen
                qtwindowmanager
     )
 endif()
index 6fdc1ce..77145bf 100644 (file)
@@ -32,7 +32,7 @@
 #include <QtQuick/qquickview.h>
 #include <QQuickWindow>
 #ifndef NATIVE_BUILD
-#include <libhomescreen.hpp>
+#include <qlibhomescreen.h>
 #include <qlibwindowmanager.h>
 #else
 #include <QScreen>
@@ -76,7 +76,7 @@ int main(int argc, char *argv[])
 
 
 #ifndef NATIVE_BUILD
-               LibHomeScreen* hs = new LibHomeScreen();
+               QLibHomeScreen* qhs = new QLibHomeScreen();
                QLibWindowmanager* qwm = new QLibWindowmanager();
 
                // WindowManager
@@ -97,9 +97,9 @@ int main(int argc, char *argv[])
 
                // HomeScreen
                std::string token = secret.toStdString();
-               hs->init(port, token.c_str());
+               qhs->init(port, token.c_str());
                // Set the event handler for Event_ShowWindow which will activate the surface for windowmanager
-               hs->set_event_handler(LibHomeScreen::Event_ShowWindow, [qwm, &graphic_role](json_object *object){
+               qhs->set_event_handler(QLibHomeScreen::Event_ShowWindow, [qwm, &graphic_role](json_object *object){
                        qDebug("Surface %s got showWindow\n", graphic_role.toStdString().c_str());
                        qwm->activateWindow(graphic_role);
                });
@@ -121,7 +121,8 @@ int main(int argc, char *argv[])
                window->setFlags(window->flags() & ~Qt::FramelessWindowHint); // Remove the borderless flag
                window->setHeight(QGuiApplication::primaryScreen()->geometry().height());
 #else
-               QObject::connect(window, SIGNAL(frameSwapped()), qwm, SLOT(slotActivateWindow()));
+               // QObject::connect(window, SIGNAL(frameSwapped()), qwm, SLOT(slotActivateWindow()));
+               qhs->setQuickWindow(window);
 #endif
        }
        else
index 76a9c3f..6b8ad13 100644 (file)
@@ -68,7 +68,7 @@ set (PKG_REQUIRED_LIST
        json-c
        libsystemd>=222
        afb-daemon
-       #libhomescreen
+       # qlibhomescreen
        # qlibwindowmanager
 )