aboutsummaryrefslogtreecommitdiffstats
path: root/src/newt/native/X11Window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/newt/native/X11Window.c')
-rw-r--r--src/newt/native/X11Window.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/newt/native/X11Window.c b/src/newt/native/X11Window.c
index 39e8f9476..90b16a5c3 100644
--- a/src/newt/native/X11Window.c
+++ b/src/newt/native/X11Window.c
@@ -1618,9 +1618,11 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_x11_X11Window_CreateWindow0
XMapWindow(dpy, window);
XIfEvent( dpy, &event, WaitForMapNotify, (XPointer) window ); // wait to get proper insets values
- (*env)->CallVoidMethod(env, jwindow, visibleChangedID, JNI_TRUE);
+ // send insets before visibility, allowing java code a proper sync point!
NewtWindows_updateInsets(env, jwindow, dpy, window, &left, &right, &top, &bottom);
+ (*env)->CallVoidMethod(env, jwindow, visibleChangedID, JNI_TRUE);
+
if(!userPos) {
// get position from WM
int dest_x, dest_y;