From 261702cf3bb494e321e1a9143091d5e463f681e7 Mon Sep 17 00:00:00 2001 From: mcherkas Date: Wed, 5 Jun 2013 14:21:31 +0400 Subject: [PATCH] 8015375: Edits to text components hang for clipboard access Reviewed-by: art, anthony Contributed-by: Dmitry Markov --- src/solaris/native/sun/xawt/XlibWrapper.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/solaris/native/sun/xawt/XlibWrapper.c b/src/solaris/native/sun/xawt/XlibWrapper.c index ac6506c5a..04dd24b17 100644 --- a/src/solaris/native/sun/xawt/XlibWrapper.c +++ b/src/solaris/native/sun/xawt/XlibWrapper.c @@ -1946,13 +1946,16 @@ secondary_loop_event(Display* dpy, XEvent* event, char* arg) { JNIEXPORT jboolean JNICALL Java_sun_awt_X11_XlibWrapper_XNextSecondaryLoopEvent(JNIEnv *env, jclass clazz, jlong display, jlong ptr) { + uint32_t timeout = 1; + AWT_CHECK_HAVE_LOCK(); exitSecondaryLoop = False; while (!exitSecondaryLoop) { if (XCheckIfEvent((Display*) jlong_to_ptr(display), (XEvent*) jlong_to_ptr(ptr), secondary_loop_event, NULL)) { return JNI_TRUE; } - AWT_WAIT(AWT_SECONDARY_LOOP_TIMEOUT); + timeout = (timeout < AWT_SECONDARY_LOOP_TIMEOUT) ? (timeout << 1) : AWT_SECONDARY_LOOP_TIMEOUT; + AWT_WAIT(timeout); } return JNI_FALSE; } -- GitLab