diff options
author | Yuta Doi <yuta-d@witz-inc.co.jp> | 2018-05-21 14:10:05 +0900 |
---|---|---|
committer | Yuta Doi <yuta-d@witz-inc.co.jp> | 2018-05-21 14:10:05 +0900 |
commit | 5b404b92f28630649d1a4063339a3d2663072a55 (patch) | |
tree | 82f4e5790a5f0ef79b87318268692163cf4e5471 /src | |
parent | d05e79b0581daec84f1d164bef2aa0d6107919f6 (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>
Diffstat (limited to 'src')
-rw-r--r-- | src/app.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/app.cpp b/src/app.cpp index ac789ad..3ddd5e0 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -1073,6 +1073,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(); |