From dfabf8c8c2c8b0bb1a5fcca7ad1090213e4eaf9a Mon Sep 17 00:00:00 2001 From: Rick Pasetto Date: Thu, 8 Oct 2009 12:53:40 -0700 Subject: DEV-39056 - Fix scroll wheel on prims the scrollEvent() API's x and y are not the same as handleScrollWheel's x and y. The latter is the position of the mouse at the time of the event. The former is the 'scroll amount' in x and y, respectively. All we have for 'scroll amount' here is 'clicks', and no mask. --- indra/newview/llviewermediafocus.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llviewermediafocus.cpp b/indra/newview/llviewermediafocus.cpp index f9377ab37b..1b1b7cedb1 100644 --- a/indra/newview/llviewermediafocus.cpp +++ b/indra/newview/llviewermediafocus.cpp @@ -304,7 +304,11 @@ BOOL LLViewerMediaFocus::handleScrollWheel(S32 x, S32 y, S32 clicks) BOOL retval = FALSE; if(mFocus.notNull() && mMediaImpl.notNull() && mMediaImpl->hasMedia()) { - mMediaImpl->getMediaPlugin()->scrollEvent(x, y, clicks); + // the scrollEvent() API's x and y are not the same as handleScrollWheel's x and y. + // The latter is the position of the mouse at the time of the event + // The former is the 'scroll amount' in x and y, respectively. + // All we have for 'scroll amount' here is 'clicks', and no mask. + mMediaImpl->getMediaPlugin()->scrollEvent(0, clicks, /*mask*/0); retval = TRUE; } return retval; -- cgit v1.2.3