diff options
author | Kazumasa Mitsunari <knimitz@witz-inc.co.jp> | 2018-06-15 17:23:39 +0900 |
---|---|---|
committer | Kazumasa Mitsunari <knimitz@witz-inc.co.jp> | 2018-06-15 17:23:39 +0900 |
commit | 5be262935589fe009fc2e22784591ace2316ce82 (patch) | |
tree | 1755450bbdb4c20ee2fae9840cf90a6fdd25a645 | |
parent | 08e31b6b18e8f09ea1df922e5d088f151a49d9c5 (diff) |
Bug Fix : set source rectangle again
Change-Id: I89b84b049e13cdc61b008d98848b46cba8ffd3a4
Signed-off-by: Kazumasa Mitsunari <knimitz@witz-inc.co.jp>
-rw-r--r-- | src/app.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/app.cpp b/src/app.cpp index 3bdabfd..fdc89fe 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(rect.x, rect.y, rect.w, rect.h); + this->controller->layers[*lid]->add_surface(surface); this->layout_commit(); |