X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fapp.cpp;h=debbcbd3e48c62950402eba36047af955f4e6597;hb=refs%2Fheads%2Fsandbox%2Fknimitz%2Fset_role_pid_ver;hp=3bdabfdf51c8396afaebbbdf56573eadcc2d8081;hpb=08e31b6b18e8f09ea1df922e5d088f151a49d9c5;p=apps%2Fagl-service-windowmanager.git diff --git a/src/app.cpp b/src/app.cpp index 3bdabfd..debbcbd 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -1385,7 +1385,18 @@ bool App::api_set_role(char const *appid, char const *drawing_name, unsigned pid // this surface is already created HMI_DEBUG("wm", "surface_id is %u, layer_id is %u", surface, *lid); - this->surface_set_layout(surface); + 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; + } + this->controller->surfaces[surface]->set_source_rectangle(0, 0, rect.w, rect.h); + this->controller->layers[*lid]->add_surface(surface); this->layout_commit();