7147055: [macosx] Cursors are changing over a blocked window; also blinking
authorserb
Fri, 04 May 2012 21:25:08 +0400
changeset 12644 087eca2f351b
parent 12643 5d709010bb1d
child 12645 e0d32945f6ab
7147055: [macosx] Cursors are changing over a blocked window; also blinking Reviewed-by: art, kizune
jdk/src/macosx/classes/sun/lwawt/LWCursorManager.java
--- a/jdk/src/macosx/classes/sun/lwawt/LWCursorManager.java	Fri May 04 18:42:08 2012 +0400
+++ b/jdk/src/macosx/classes/sun/lwawt/LWCursorManager.java	Fri May 04 21:25:08 2012 +0400
@@ -88,20 +88,20 @@
         } else {
             cursor = (c != null) ? c.getCursor() : null;
         }
-        // TODO: default cursor for modal blocked windows
         setCursor(cursor);
     }
 
     /**
      * Returns the first visible, enabled and showing component under cursor.
+     * Returns null for modal blocked windows.
      *
      * @param cursorPos Current cursor position.
-     * @return Component
+     * @return Component or null.
      */
     private static final Component findComponent(final Point cursorPos) {
         final LWComponentPeer<?, ?> peer = LWWindowPeer.getPeerUnderCursor();
         Component c = null;
-        if (peer != null) {
+        if (peer != null && peer.getWindowPeerOrSelf().getBlocker() == null) {
             c = peer.getTarget();
             if (c instanceof Container) {
                 final Point p = peer.getLocationOnScreen();