diff options
author | David Robillard <d@drobilla.net> | 2022-06-03 21:52:55 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-06-07 10:15:21 -0400 |
commit | d462f742adfbb1188105d5b7470aa4ddc4ac80fd (patch) | |
tree | d7c5d9e6e8c8a60db504e670541d9b83f4f9bc98 /src | |
parent | 677b18968410ce9bf2cdd117d3fd9cd7d1336d30 (diff) | |
download | pugl-d462f742adfbb1188105d5b7470aa4ddc4ac80fd.tar.gz pugl-d462f742adfbb1188105d5b7470aa4ddc4ac80fd.tar.bz2 pugl-d462f742adfbb1188105d5b7470aa4ddc4ac80fd.zip |
X11: Flush before returning from puglRealize()
This avoids bugs in plugins, because otherwise it's possible that size hints
are not available when the host embeds the UI.
Diffstat (limited to 'src')
-rw-r--r-- | src/x11.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -470,6 +470,14 @@ puglRealize(PuglView* const view) puglDispatchSimpleEvent(view, PUGL_CREATE); + /* Flush before returning for two reasons: so that hints are available to the + view's parent via the X server during embedding, and so that the X server + has a chance to create the window (and make its actual position and size + known) before any children are created. Potential bugs aside, this + increases the chances that an application will be cleanly configured once + on startup with the correct position and size. */ + XFlush(display); + return PUGL_SUCCESS; } |