diff options
author | wang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com> | 2019-05-28 15:09:50 +0800 |
---|---|---|
committer | wang_zhiqiang <wang_zhiqiang@dl.cn.nexty-ele.com> | 2019-05-28 15:09:50 +0800 |
commit | f266dcd35564ea649ed1435a3ab7a3abbef900d9 (patch) | |
tree | 20445cf2c0d8dc21da67cedbdbde205409f305a6 | |
parent | 7d29d877baafe52cc0e0bbdf7d86deff61073651 (diff) |
only when startup call activateWindow
Change-Id: I75d629c825dc5ba6cd66491d29e7f23954b0548d
-rw-r--r-- | homescreen/src/homescreenhandler.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/homescreen/src/homescreenhandler.cpp b/homescreen/src/homescreenhandler.cpp index a06fa7e..cbf816a 100644 --- a/homescreen/src/homescreenhandler.cpp +++ b/homescreen/src/homescreenhandler.cpp @@ -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){ |