8077686: OperationTimedOut exception inside from XToolkit.syncNativeQueue call on Ubuntu 15.04
Reviewed-by: alexsch, serb
--- 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");