diff options
| author | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2016-03-29 13:30:00 +0300 | 
|---|---|---|
| committer | Mnikolenko ProductEngine <mnikolenko@productengine.com> | 2016-03-29 13:30:00 +0300 | 
| commit | 272d40a0892108de5e54f8b440f95e4c270686a7 (patch) | |
| tree | 8286027e8fd2b61e92219dc17f519324993bbcc1 | |
| parent | d9545003ed3b4f28d10ccee6939831ff7d74b53f (diff) | |
MAINT-6239 [Mac] Computer cursor appears attached to crosshair after using modifier keys in mouselook
| -rwxr-xr-x | indra/llwindow/llwindowmacosx-objc.h | 1 | ||||
| -rwxr-xr-x | indra/llwindow/llwindowmacosx-objc.mm | 5 | ||||
| -rwxr-xr-x | indra/llwindow/llwindowmacosx.cpp | 12 | 
3 files changed, 16 insertions, 2 deletions
| diff --git a/indra/llwindow/llwindowmacosx-objc.h b/indra/llwindow/llwindowmacosx-objc.h index ce74fc83cc..507d1239be 100755 --- a/indra/llwindow/llwindowmacosx-objc.h +++ b/indra/llwindow/llwindowmacosx-objc.h @@ -92,6 +92,7 @@ void setCrossCursor();  void setNotAllowedCursor();  void hideNSCursor();  void showNSCursor(); +bool isCGCursorVisible();  void hideNSCursorTillMove(bool hide);  void requestUserAttention();  long showAlert(std::string title, std::string text, int type); diff --git a/indra/llwindow/llwindowmacosx-objc.mm b/indra/llwindow/llwindowmacosx-objc.mm index 1a21bf8430..43ce9a2255 100755 --- a/indra/llwindow/llwindowmacosx-objc.mm +++ b/indra/llwindow/llwindowmacosx-objc.mm @@ -163,6 +163,11 @@ void showNSCursor()  	[NSCursor unhide];  } +bool isCGCursorVisible() +{ +    return CGCursorIsVisible(); +} +  void hideNSCursorTillMove(bool hide)  {  	[NSCursor setHiddenUntilMouseMoves:hide]; diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index 8cbf5a31fb..c6bf93507a 100755 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -1457,8 +1457,16 @@ void LLWindowMacOSX::updateCursor()  		mNextCursor = UI_CURSOR_WORKING;  	} -	if(mCurrentCursor == mNextCursor) -		return; +    if(mCurrentCursor == mNextCursor) +    { +        if(mCursorHidden && isCGCursorVisible()) +        { +            hideNSCursor(); +            mHideCursorPermanent = TRUE; +            adjustCursorDecouple(); +        } +        return; +    }  	// RN: replace multi-drag cursors with single versions  	if (mNextCursor == UI_CURSOR_ARROWDRAGMULTI) | 
