changeset 12265:c2a82248f3f9

8077686: OperationTimedOut exception inside from XToolkit.syncNativeQueue call on Ubuntu 15.04 Reviewed-by: alexsch, serb
author azvegint
date Mon, 15 Jun 2015 14:43:31 +0300
parents 6239575cffa2
children 85a1af70df88 c44bb2ab6ab7
files src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java	Fri Jun 12 15:01:10 2015 +0300
+++ b/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java	Mon Jun 15 14:43:31 2015 +0300
@@ -2466,7 +2466,7 @@
 
     private static XEventDispatcher oops_waiter;
     private static boolean oops_updated;
-    private static boolean oops_move;
+    private static int oops_position = 0;
 
     /**
      * @inheritDoc
@@ -2495,9 +2495,12 @@
             oops_updated = false;
             long event_number = getEventNumber();
             // Generate OOPS ConfigureNotify event
-            XlibWrapper.XMoveWindow(getDisplay(), win.getWindow(), oops_move ? 0 : 1, 0);
+            XlibWrapper.XMoveWindow(getDisplay(), win.getWindow(), ++oops_position, 0);
             // Change win position each time to avoid system optimization
-            oops_move = !oops_move;
+            if (oops_position > 50) {
+                oops_position = 0;
+            }
+
             XSync();
 
             eventLog.finer("Generated OOPS ConfigureNotify event");