summaryrefslogtreecommitdiff
path: root/indra/llwindow/llwindowmacosx.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llwindow/llwindowmacosx.cpp')
-rw-r--r--indra/llwindow/llwindowmacosx.cpp26
1 files changed, 14 insertions, 12 deletions
diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp
index d116f0dfff..d4832602a0 100644
--- a/indra/llwindow/llwindowmacosx.cpp
+++ b/indra/llwindow/llwindowmacosx.cpp
@@ -1164,6 +1164,8 @@ void LLWindowMacOSX::gatherInput()
}
}
+
+ updateCursor();
}
BOOL LLWindowMacOSX::getPosition(LLCoordScreen *position)
@@ -2841,7 +2843,7 @@ static void initPixmapCursor(int cursorid, int hotspotX, int hotspotY)
gCursors[cursorid] = createImageCursor(fullpath.c_str(), hotspotX, hotspotY);
}
-void LLWindowMacOSX::setCursor(ECursorType cursor)
+void LLWindowMacOSX::updateCursor()
{
OSStatus result = noErr;
@@ -2849,30 +2851,30 @@ void LLWindowMacOSX::setCursor(ECursorType cursor)
{
// A drag is in progress...remember the requested cursor and we'll
// restore it when it is done
- mCurrentCursor = cursor;
+ mCurrentCursor = mNextCursor;
return;
}
- if (cursor == UI_CURSOR_ARROW
+ if (mNextCursor == UI_CURSOR_ARROW
&& mBusyCount > 0)
{
- cursor = UI_CURSOR_WORKING;
+ mNextCursor = UI_CURSOR_WORKING;
}
- if(mCurrentCursor == cursor)
+ if(mCurrentCursor == mNextCursor)
return;
// RN: replace multi-drag cursors with single versions
- if (cursor == UI_CURSOR_ARROWDRAGMULTI)
+ if (mNextCursor == UI_CURSOR_ARROWDRAGMULTI)
{
- cursor = UI_CURSOR_ARROWDRAG;
+ mNextCursor = UI_CURSOR_ARROWDRAG;
}
- else if (cursor == UI_CURSOR_ARROWCOPYMULTI)
+ else if (mNextCursor == UI_CURSOR_ARROWCOPYMULTI)
{
- cursor = UI_CURSOR_ARROWCOPY;
+ mNextCursor = UI_CURSOR_ARROWCOPY;
}
- switch(cursor)
+ switch(mNextCursor)
{
default:
case UI_CURSOR_ARROW:
@@ -2923,7 +2925,7 @@ void LLWindowMacOSX::setCursor(ECursorType cursor)
case UI_CURSOR_TOOLSIT:
case UI_CURSOR_TOOLBUY:
case UI_CURSOR_TOOLOPEN:
- result = setImageCursor(gCursors[cursor]);
+ result = setImageCursor(gCursors[mNextCursor]);
break;
}
@@ -2933,7 +2935,7 @@ void LLWindowMacOSX::setCursor(ECursorType cursor)
InitCursor();
}
- mCurrentCursor = cursor;
+ mCurrentCursor = mNextCursor;
}
ECursorType LLWindowMacOSX::getCursor() const