only when startup call activateWindow
authorwang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>
Tue, 28 May 2019 07:09:50 +0000 (15:09 +0800)
committerwang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com>
Tue, 28 May 2019 07:09:50 +0000 (15:09 +0800)
Change-Id: I75d629c825dc5ba6cd66491d29e7f23954b0548d

homescreen/src/homescreenhandler.cpp

index a06fa7e..cbf816a 100644 (file)
@@ -52,8 +52,14 @@ void HomescreenHandler::init(int port, const char *token, QLibWindowmanager *qwm
 
     mp_qhs->set_event_handler(QLibHomeScreen::Event_ShowWindow,[this](json_object *object){
         HMI_DEBUG("Launcher","Surface launcher got Event_ShowWindow\n");
-        mp_qwm->activateWindow(m_myname);
-       emit showWindow();
+        static bool first_start = true;
+        if (first_start) {
+            first_start = false;
+            mp_qwm->activateWindow(m_myname);
+        }
+        else {
+            emit showWindow();
+        }
     });
 
     mp_qhs->set_event_handler(QLibHomeScreen::Event_OnScreenMessage, [this](json_object *object){