changeset 6607:61d0911d5bd8

8015375: Edits to text components hang for clipboard access Reviewed-by: anthony, art
author dmarkov
date Thu, 06 Jun 2013 18:14:42 +0400
parents c67bf7ef6881
children 3c100c6c3923
files src/solaris/native/sun/xawt/XlibWrapper.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/solaris/native/sun/xawt/XlibWrapper.c	Wed Jun 05 20:43:56 2013 +0400
+++ b/src/solaris/native/sun/xawt/XlibWrapper.c	Thu Jun 06 18:14:42 2013 +0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -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;
 }