X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fwindow_manager.cpp;fp=src%2Fwindow_manager.cpp;h=4db577d1272241c7d3ef972f795d9187c389e517;hb=4d67209654fe8de3407b513800471fc48c4865fc;hp=4efae898e85ce810ee5b49b603760e2767974f30;hpb=3bb2a22cfda22c2a7ad2e9d9d6266f116b0cf12a;p=apps%2Fagl-service-windowmanager.git diff --git a/src/window_manager.cpp b/src/window_manager.cpp index 4efae89..4db577d 100644 --- a/src/window_manager.cpp +++ b/src/window_manager.cpp @@ -198,6 +198,22 @@ result WindowManager::api_request_surface(char const *appid, char const *dr char const *WindowManager::api_request_surface(char const *appid, char const *drawing_name, char const *ivi_id) { + unsigned sid = std::stol(ivi_id); + + HMI_DEBUG("This API(requestSurfaceXDG) is for XDG Application using runXDG"); + /* + * IVI-shell doesn't send surface_size event via ivi-wm protocol + * if the application is using XDG surface. + * So WM has to set surface size with original size here + */ + WMError ret = this->lc->setXDGSurfaceOriginSize(sid); + if(ret != SUCCESS) + { + HMI_ERROR("%s", errorDescription(ret)); + HMI_WARNING("The main user of this API is runXDG"); + return "fail"; + } + // TODO: application requests by old role, // so convert role old to new const char *role = this->convertRoleOldToNew(drawing_name); @@ -226,31 +242,15 @@ char const *WindowManager::api_request_surface(char const *appid, char const *dr g_app_list.addClient(s_appid, l_id, s_role); } - unsigned sid = std::stol(ivi_id); - auto rname = this->id_alloc.lookup(s_role); if (rname) { return "Surface already present"; } - if(this->tmp_surface2app.count(sid) != 0) - { - this->tmp_surface2app.erase(sid); - } - // register pair drawing_name and ivi_id this->id_alloc.register_name_id(role, sid); - // this->layers.add_surface(sid, *lid); - - // this surface is already created - // HMI_DEBUG("surface_id is %u, layer_id is %u", sid, *lid); - - // this->controller->layers[*lid]->add_surface(sid); - // this->layout_commit(); - // add client into the db - // g_app_list.addClient(appid_str, lid, s_role); auto client = g_app_list.lookUpClient(s_appid); client->addSurface(sid);