8077686: OperationTimedOut exception inside from XToolkit.syncNativeQueue call on Ubuntu 15.04
authorazvegint
Mon, 15 Jun 2015 14:43:31 +0300
changeset 31435 012c1c0bf5d6
parent 31434 3b61ff08431b
child 31436 41c1e00e441f
child 31438 5593480edd2a
8077686: OperationTimedOut exception inside from XToolkit.syncNativeQueue call on Ubuntu 15.04 Reviewed-by: alexsch, serb
jdk/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11/XToolkit.java	Fri Jun 12 15:01:10 2015 +0300
+++ b/jdk/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");