7043815: AWT-XAWT - AWT-EventQueue-0 deadlock.
authorserb
Fri, 15 Jul 2011 19:19:33 +0400
changeset 10095 daec42746ec0
parent 10094 f211e6ca5dff
child 10096 f9ac9a52952d
7043815: AWT-XAWT - AWT-EventQueue-0 deadlock. Reviewed-by: art, dcherepanov
jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java
--- a/jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java	Fri Jul 15 19:18:38 2011 +0400
+++ b/jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java	Fri Jul 15 19:19:33 2011 +0400
@@ -185,11 +185,8 @@
      */
     @Override
     public void pSetCursor(Cursor cursor, boolean ignoreSubComponents) {
-        Point onScreen = getLocationOnScreen();
         if (ignoreSubComponents ||
-            javaMouseEventHandler == null ||
-            onScreen == null)
-        {
+            javaMouseEventHandler == null) {
             super.pSetCursor(cursor, true);
             return;
         }
@@ -197,6 +194,7 @@
         Point cursorPos = new Point();
         ((XGlobalCursorManager)XGlobalCursorManager.getCursorManager()).getCursorPos(cursorPos);
 
+        final Point onScreen = getLocationOnScreen();
         Point localPoint = new Point(cursorPos.x - onScreen.x, cursorPos.y - onScreen.y );
 
         javaMouseEventHandler.setPointerToUnderPoint(localPoint);