diff options
author | Kazumasa Mitsunari <knimitz@witz-inc.co.jp> | 2018-06-15 16:29:19 +0900 |
---|---|---|
committer | Kazumasa Mitsunari <knimitz@witz-inc.co.jp> | 2018-06-15 16:29:19 +0900 |
commit | 0475c3cea96013a2376f85b731541fcafc7f6816 (patch) | |
tree | 4025f0039de3d52e7f4e631792938a782cdc663f | |
parent | 1da66cc3a0c65f9e3768397a479c30f1defde997 (diff) |
Set source rectangle by layer information
Change-Id: I3973432afb5d4fb174f1a2e070a9dd9e9b7ee0c6
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
-rw-r--r-- | src/app.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/app.cpp b/src/app.cpp index da503b5..c0130d2 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -1385,6 +1385,10 @@ 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); + const auto &o_layer = this->layers.get_layer(*lid); + auto rect = o_layer.value().rect; + this->controller->surfaces[surface]->set_source_rectangle(rect.x, rect.y, rect.w, rect.h); + this->controller->layers[*lid]->add_surface(surface); this->layout_commit(); |