diff options
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 022834b..2584da0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,4 +1,4 @@ -/* +/*; * Copyright (c) 2017 TOYOTA MOTOR CORPORATION * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -49,6 +49,8 @@ struct afb_instance ~afb_instance() = default; int init(); + + bool testFlg; }; struct afb_instance *g_afb_instance; @@ -71,6 +73,8 @@ int _binding_init() goto error; } + g_afb_instance->testFlg = false; + atexit([] { delete g_afb_instance; }); return 0; @@ -307,6 +311,22 @@ void windowmanager_activatewindow(afb_req req) noexcept afb_req_success(req, NULL, "success"); }; + HMI_DEBUG("activateWindow role:%s area:%s", appid, a_drawing_area); + +#if 0 + std::string appidString = appid; + HMI_DEBUG("flg: %d", g_afb_instance->testFlg); + if ((appidString == "dashboard" && g_afb_instance->testFlg) || appidString == "hudspeed") + { + HMI_DEBUG("%s is remote transfer", appid); + g_afb_instance->wmgr.api_activate_surface_to_master( + appid, a_drawing_name, "hud.upper.left", reply); + + g_afb_instance->testFlg = false; + return; + } + +#endif if (!g_afb_instance->wmgr.wmcon.isRemoteArea(a_drawing_area)) { g_afb_instance->wmgr.api_activate_window( @@ -331,6 +351,12 @@ void windowmanager_activatewindow(afb_req req) noexcept appid, a_drawing_name, a_drawing_area, reply); } } +#if 0 + if (appidString == "dashboard") + { + g_afb_instance->testFlg = true; + } +#endif free(appid); } } @@ -720,7 +746,11 @@ void windowmanager_wm_subscribe(afb_req req) noexcept } afb_req_success(req, NULL, "success"); - g_afb_instance->wmgr.setSubscribed(true); + if (event_id == 7) + { + //g_afb_instance->wmgr.api_handshake(); + g_afb_instance->wmgr.setSubscribed(true); + } } catch (std::exception &e) { |