Backing out 40802 (backout of backout of MAINT-3250 - mouse issues in world map) - Now it gets confusing. MAINT-3250 should now be gone from our code, because MAINT-3870 didn't fix it either and will also be backed out.

ziree 2014-04-28 17:47:37 +02:00
parent 508a51afbc
commit fb5c21dd29
2 changed files with 22 additions and 2 deletions

View File

@ -3648,6 +3648,9 @@ void LLViewerWindow::updateUI()
updateLayout();
// <FS:Ansariel> Backout MAINT-3250
mLastMousePoint = mCurrentMousePoint;
saveLastMouse(mCurrentMousePoint);
// cleanup unused selections when no modal dialogs are open
@ -3890,7 +3893,8 @@ void LLViewerWindow::saveLastMouse(const LLCoordGL &point)
// Store last mouse location.
// If mouse leaves window, pretend last point was on edge of window
mLastMousePoint = mCurrentMousePoint;
// <FS:Ansariel> Backout MAINT-3250
//mLastMousePoint = mCurrentMousePoint;
if (point.mX < 0)
{

View File

@ -1696,6 +1696,16 @@ void LLWorldMapView::handleClick(S32 x, S32 y, MASK mask,
}
// <FS:Ansariel> Backout MAINT-3250
BOOL outside_slop(S32 x, S32 y, S32 start_x, S32 start_y)
{
S32 dx = x - start_x;
S32 dy = y - start_y;
return (dx <= -2 || 2 <= dx || dy <= -2 || 2 <= dy);
}
// </FS:Ansariel>
BOOL LLWorldMapView::handleMouseDown( S32 x, S32 y, MASK mask )
{
gFocusMgr.setMouseCapture( this );
@ -1778,7 +1788,10 @@ BOOL LLWorldMapView::handleHover( S32 x, S32 y, MASK mask )
{
if (hasMouseCapture())
{
if (mPanning || llabs(x - mMouseDownX) > 1 || llabs(y - mMouseDownY) > 1)
// <FS:Ansariel> Backout MAINT-3250
//if (mPanning || llabs(x - mMouseDownX) > 1 || llabs(y - mMouseDownY) > 1)
if (mPanning || outside_slop(x, y, mMouseDownX, mMouseDownY))
// </FS:Ansariel>
{
// just started panning, so hide cursor
if (!mPanning)
@ -1795,6 +1808,9 @@ BOOL LLWorldMapView::handleHover( S32 x, S32 y, MASK mask )
sPanY += delta_y;
sTargetPanX = sPanX;
sTargetPanY = sPanY;
// <FS:Ansariel> Backout MAINT-3250
gViewerWindow->moveCursorToCenter();
}
// doesn't matter, cursor should be hidden