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

Print this page

        

*** 1225,1238 **** sendEventToDelegate(e); } protected void sendEventToDelegate(final AWTEvent e) { - synchronized (getDelegateLock()) { if (getDelegate() == null || !isShowing() || !isEnabled()) { return; } AWTEvent delegateEvent = createDelegateEvent(e); if (delegateEvent != null) { AWTAccessor.getComponentAccessor() .processEvent((Component) delegateEvent.getSource(), delegateEvent); --- 1225,1238 ---- sendEventToDelegate(e); } protected void sendEventToDelegate(final AWTEvent e) { if (getDelegate() == null || !isShowing() || !isEnabled()) { return; } + synchronized (getDelegateLock()) { AWTEvent delegateEvent = createDelegateEvent(e); if (delegateEvent != null) { AWTAccessor.getComponentAccessor() .processEvent((Component) delegateEvent.getSource(), delegateEvent);
*** 1242,1252 **** } } } } ! protected AWTEvent createDelegateEvent(AWTEvent e) { AWTEvent delegateEvent = null; if (e instanceof MouseWheelEvent) { MouseWheelEvent me = (MouseWheelEvent) e; delegateEvent = new MouseWheelEvent( delegate, me.getID(), me.getWhen(), --- 1242,1257 ---- } } } } ! /** ! * Changes the target of the AWTEvent from awt component to appropriate ! * swing delegate. ! */ ! private AWTEvent createDelegateEvent(final AWTEvent e) { ! // TODO modifiers should be changed to getModifiers()|getModifiersEx()? AWTEvent delegateEvent = null; if (e instanceof MouseWheelEvent) { MouseWheelEvent me = (MouseWheelEvent) e; delegateEvent = new MouseWheelEvent( delegate, me.getID(), me.getWhen(),