Commit b2ede84b authored by pinkerton%netscape.com's avatar pinkerton%netscape.com
Browse files

make sure mouse loc is in local coordinates on a scrollwheel event. sr=sfraser. bug# 112448.

parent d71235b9
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -695,9 +695,13 @@ nsMacWindow :: ScrollEventHandler ( EventHandlerCallRef inHandlerChain, EventRef

  if ( err1 == noErr && err2 == noErr && err3 == noErr ) {
    nsMacWindow* self = NS_REINTERPRET_CAST(nsMacWindow*, userData);
    if ( self )
    if ( self ) {
      // convert mouse to local coordinates since that's how gecko wants them
      StPortSetter portSetter(self->mWindowPtr);
      ::GlobalToLocal(&mouseLoc);
      self->mMacEventHandler->Scroll ( axis, delta, mouseLoc );
    }
  }
  return noErr;
  
} // ScrollEventHandler