aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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();