From de9a419a315d16edee2c5da74bbf7ea1f89bef30 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 9 Sep 2011 17:53:25 +0200 Subject: NEWT/Window: CreateWindow - Wait for user req. position: Fix about window-decoration/insets size --- src/newt/native/WindowsWindow.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/newt/native/WindowsWindow.c') diff --git a/src/newt/native/WindowsWindow.c b/src/newt/native/WindowsWindow.c index 1cb0f2036..6990bcb83 100644 --- a/src/newt/native/WindowsWindow.c +++ b/src/newt/native/WindowsWindow.c @@ -1388,9 +1388,11 @@ JNIEXPORT jlong JNICALL Java_jogamp_newt_driver_windows_WindowsWindow_CreateWind BOOL userPos = 0<=x && 0<=y ; ShowWindow(window, SW_SHOW); - (*env)->CallVoidMethod(env, wud->jinstance, visibleChangedID, JNI_TRUE); + // send insets before visibility, allowing java code a proper sync point! insets = UpdateInsets(env, wud->jinstance, window); + (*env)->CallVoidMethod(env, wud->jinstance, visibleChangedID, JNI_TRUE); + if(!userPos) { GetWindowRect(window, &rc); x = rc.left + insets->left; // client coords -- cgit v1.2.3