Ticket #2477: 2477.patch

File 2477.patch, 999 bytes (added by deni, 15 years ago)
  • src/main/java/org/sophie2/base/commons/gui/MouseCapture.java

    ### Eclipse Workspace Patch 1.0
    #P org.sophie2.base.commons
     
    3232                this.initCompX = initCompX; 
    3333                this.initCompY = initCompY; 
    3434                 
    35                 Point componentPoint = e.getComponent().getLocationOnScreen(); 
     35                Point componentPoint = e.getComponent().getLocation(); 
    3636 
    3737                if(!isInTestMode()) { 
    3838                        this.initMouseX = componentPoint.x + e.getX(); 
     
    6161         
    6262        public final void eventDispatched(AWTEvent event) { 
    6363                MouseEvent m = (MouseEvent)event; 
    64                 Point componentPoint = m.getComponent().getLocationOnScreen(); 
     64                Point componentPoint = m.getComponent().getLocation(); 
    6565 
    6666                m.consume(); 
    6767                int newX = this.initCompX + componentPoint.x + m.getX() - this.initMouseX;