- app_list->addClient(id, *lid, surface, role);
+ g_app_list.addClient(id, *lid, surface, role);
+ }
+
+ // register pair drawing_name and ivi_id
+ this->id_alloc.register_name_id(role.c_str(), surface);
+ this->layers.add_surface(surface, *lid);
+
+ // this surface is already created
+ HMI_DEBUG("wm", "surface_id is %u, layer_id is %u", surface, *lid);
+
+ const auto &o_layer = this->layers.get_layer(*lid);
+ auto rect = o_layer.value().rect;
+ if(rect.w < 0)
+ {
+ rect.w = this->controller->output_size.w + 1 + rect.w;
+ }
+ if(rect.h < 0)
+ {
+ rect.h = this->controller->output_size.h + 1 + rect.h;