Changeset 1258 in josm


Ignore:
Timestamp:
2009-01-13T15:51:20+01:00 (13 years ago)
Author:
stoecker
Message:

fixed bug #2018. Patch by markb ordern com

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/MapStatus.java

    r1169 r1258  
    1515import java.awt.Toolkit;
    1616import java.awt.event.AWTEventListener;
     17import java.awt.event.ComponentEvent;
    1718import java.awt.event.InputEvent;
    1819import java.awt.event.KeyAdapter;
     
    300301            Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener(){
    301302                public void eventDispatched(AWTEvent event) {
    302                     synchronized (collector) {
    303                         mouseState.modifiers = ((InputEvent)event).getModifiersEx();
    304                         if (event instanceof MouseEvent)
    305                             mouseState.mousePos = ((MouseEvent)event).getPoint();
    306                         collector.notify();
     303                    if (event instanceof ComponentEvent &&
     304                        ((ComponentEvent)event).getComponent() == mapFrame.mapView) {
     305                        synchronized (collector) {
     306                            mouseState.modifiers = ((InputEvent)event).getModifiersEx();
     307                            if (event instanceof MouseEvent)
     308                                mouseState.mousePos = ((MouseEvent)event).getPoint();
     309                            collector.notify();
     310                        }
    307311                    }
    308312                }
Note: See TracChangeset for help on using the changeset viewer.