src/macosx/classes/sun/lwawt/LWWindowPeer.java

Print this page

        

*** 667,676 **** --- 667,678 ---- } lastMouseEventPeer = null; } } else { if (targetPeer != lastMouseEventPeer) { + + if (id != MouseEvent.MOUSE_DRAGGED || lastMouseEventPeer == null) { // lastMouseEventPeer may be null if mouse was out of Java windows if (lastMouseEventPeer != null && lastMouseEventPeer.isEnabled()) { // Sometimes, MOUSE_EXITED is not sent by delegate (or is sent a bit // later), in which case lastWindowPeer is another window if (lastWindowPeer != this) {
*** 691,710 **** when, modifiers, oldp.x, oldp.y, screenX, screenY, clickCount, popupTrigger, button)); } } - lastMouseEventPeer = targetPeer; if (targetPeer != null && targetPeer.isEnabled() && id != MouseEvent.MOUSE_ENTERED) { Point newp = targetPeer.windowToLocal(x, y, curWindowPeer); postEvent(new MouseEvent(targetPeer.getTarget(), MouseEvent.MOUSE_ENTERED, when, modifiers, newp.x, newp.y, screenX, screenY, clickCount, popupTrigger, button)); } } // TODO: fill "bdata" member of AWTEvent int eventButtonMask = (button > 0)? MouseEvent.getMaskForButton(button) : 0; int otherButtonsPressed = modifiers & ~eventButtonMask; --- 693,713 ---- when, modifiers, oldp.x, oldp.y, screenX, screenY, clickCount, popupTrigger, button)); } } if (targetPeer != null && targetPeer.isEnabled() && id != MouseEvent.MOUSE_ENTERED) { Point newp = targetPeer.windowToLocal(x, y, curWindowPeer); postEvent(new MouseEvent(targetPeer.getTarget(), MouseEvent.MOUSE_ENTERED, when, modifiers, newp.x, newp.y, screenX, screenY, clickCount, popupTrigger, button)); } } + lastMouseEventPeer = targetPeer; + } // TODO: fill "bdata" member of AWTEvent int eventButtonMask = (button > 0)? MouseEvent.getMaskForButton(button) : 0; int otherButtonsPressed = modifiers & ~eventButtonMask;