From 578edfc20915e2e2aa18aa06e49f7341f86990c4 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 6 Dec 2019 08:43:05 +0100 Subject: Bug 1413 - NEWT X11Window: NewtWindows_getFrameExtends(..) may hang on XPeekEvent(..) The wait loop uses XPeekEvent(dpy, &e), which can block indefinite if queue is empty. Replace with timeout only _and_ only wait on CreateWindow0(..) not when queried via X11Display dispatch loop on events when it is assumed the information has been propagated already. --- src/newt/native/X11Display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/newt/native/X11Display.c') diff --git a/src/newt/native/X11Display.c b/src/newt/native/X11Display.c index abaabbb70..f3359b49e 100644 --- a/src/newt/native/X11Display.c +++ b/src/newt/native/X11Display.c @@ -761,7 +761,7 @@ JNIEXPORT void JNICALL Java_jogamp_newt_driver_x11_DisplayDriver_DispatchMessage int left=-1, right=-1, top=-1, bottom=-1; uint32_t netWMState = NewtWindows_getNET_WM_STATE(dpy, jw); int visibleChange = NewtWindows_updateVisibility(env, dpy, jw, netWMState, "ConfigureNotify"); - NewtWindows_updateInsets(dpy, jw, &left, &right, &top, &bottom); + NewtWindows_updateInsets(dpy, jw, False /* wait */, &left, &right, &top, &bottom); Bool maxChanged = NewtWindows_updateMaximized(dpy, jw, netWMState); (*env)->CallVoidMethod(env, jw->jwindow, sizePosMaxInsetsVisibleChangedID, JNI_FALSE, (jint) evt.xconfigure.x, (jint) evt.xconfigure.y, -- cgit v1.2.3