diff --git a/indra/llwindow/llwindowmacosx-objc.h b/indra/llwindow/llwindowmacosx-objc.h index d8cacb76d3b5b9926bf44d2a8b0905ad7533c655..f8d40cd3ae5bd98fffd7d29c69a74d83e956e37e 100644 --- a/indra/llwindow/llwindowmacosx-objc.h +++ b/indra/llwindow/llwindowmacosx-objc.h @@ -96,6 +96,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 19442500dc530a805bdebe5d6b222e9abb7df470..3fe898f5ae69474ee9e4ae75ab0bd0095e9f9dd6 100644 --- 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 61dd48d2cb98edd224012cf79b91f9f7e78529db..6c94e110d09f44c4354f1a9ee796894503c9f5c4 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -1485,6 +1485,11 @@ void LLWindowMacOSX::updateCursor() if(mCurrentCursor == mNextCursor) { + if(mCursorHidden && mHideCursorPermanent && isCGCursorVisible()) + { + hideNSCursor(); + adjustCursorDecouple(); + } return; }