aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuta Doi <yuta-d@witz-inc.co.jp>2018-05-21 14:10:05 +0900
committerYuta Doi <yuta-d@witz-inc.co.jp>2018-05-21 14:16:25 +0900
commit8e62d3497f82e0febf088538e54b1cdb927ee4aa (patch)
tree31ff5f831f0293ab5db6145a9ce6d21f6483c6c9
parent45267ce560de325103172443d13336c11b8b3e2e (diff)
Waiting for the surface of new app is created before setting the size
Change-Id: I7e60330739388b5b5dc339076f432e6ca77f12b4 Signed-off-by: Yuta Doi <yuta-d@witz-inc.co.jp>
-rw-r--r--src/app.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/app.cpp b/src/app.cpp
index eaebd59..7191727 100644
--- a/src/app.cpp
+++ b/src/app.cpp
@@ -1100,6 +1100,12 @@ void App::setSurfaceSize(const char* role, const char* area) {
// Set destination to the display rectangle
int surface_id = this->role2surfaceid_[role];
+
+ if (!this->controller->surface_exists(surface_id)) {
+ // Block until all pending request are processed by wayland display server
+ // because waiting for the surface of new app is created
+ this->display->roundtrip();
+ }
auto &s = this->controller->surfaces[surface_id];
s->set_destination_rectangle(size.x, size.y, size.w, size.h);
this->layout_commit();