changeset 17903:643f1ca93dd6

8015375: Edits to text components hang for clipboard access Reviewed-by: art, anthony Contributed-by: Dmitry Markov <dmitry.markov@oracle.com>
author mcherkas
date Wed, 05 Jun 2013 14:21:31 +0400
parents 14a0ae3ca973
children 0be4c7d2e53b
files jdk/src/solaris/native/sun/xawt/XlibWrapper.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/src/solaris/native/sun/xawt/XlibWrapper.c	Mon Jun 03 16:37:13 2013 +0400
+++ b/jdk/src/solaris/native/sun/xawt/XlibWrapper.c	Wed Jun 05 14:21:31 2013 +0400
@@ -1946,13 +1946,16 @@
 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;
 }