merge changes for storm-1713
commit
cbfec00c6e
|
|
@ -171,6 +171,7 @@ Ansariel Hiller
|
|||
VWR-25480
|
||||
VWR-26150
|
||||
STORM-1685
|
||||
STORM-1713
|
||||
Aralara Rajal
|
||||
Ardy Lay
|
||||
STORM-859
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@ LLWindow::LLWindow(LLWindowCallbacks* callbacks, BOOL fullscreen, U32 flags)
|
|||
mSupportedResolutions(NULL),
|
||||
mNumSupportedResolutions(0),
|
||||
mCurrentCursor(UI_CURSOR_ARROW),
|
||||
mNextCursor(UI_CURSOR_ARROW),
|
||||
mCursorHidden(FALSE),
|
||||
mBusyCount(0),
|
||||
mIsMouseClipping(FALSE),
|
||||
|
|
|
|||
|
|
@ -91,8 +91,9 @@ public:
|
|||
virtual S32 getBusyCount() const;
|
||||
|
||||
// Sets cursor, may set to arrow+hourglass
|
||||
virtual void setCursor(ECursorType cursor) = 0;
|
||||
virtual void setCursor(ECursorType cursor) { mNextCursor = cursor; };
|
||||
virtual ECursorType getCursor() const;
|
||||
virtual void updateCursor() = 0;
|
||||
|
||||
virtual void captureMouse() = 0;
|
||||
virtual void releaseMouse() = 0;
|
||||
|
|
@ -181,6 +182,7 @@ protected:
|
|||
LLWindowResolution* mSupportedResolutions;
|
||||
S32 mNumSupportedResolutions;
|
||||
ECursorType mCurrentCursor;
|
||||
ECursorType mNextCursor;
|
||||
BOOL mCursorHidden;
|
||||
S32 mBusyCount; // how deep is the "cursor busy" stack?
|
||||
BOOL mIsMouseClipping; // Is this window currently clipping the mouse
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public:
|
|||
/*virtual*/ void showCursorFromMouseMove() {};
|
||||
/*virtual*/ void hideCursorUntilMouseMove() {};
|
||||
/*virtual*/ BOOL isCursorHidden() {return FALSE;};
|
||||
/*virtual*/ void setCursor(ECursorType cursor) {};
|
||||
/*virtual*/ void updateCursor() {};
|
||||
//virtual ECursorType getCursor() { return mCurrentCursor; };
|
||||
/*virtual*/ void captureMouse() {};
|
||||
/*virtual*/ void releaseMouse() {};
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ public:
|
|||
/*virtual*/ void showCursorFromMouseMove();
|
||||
/*virtual*/ void hideCursorUntilMouseMove();
|
||||
/*virtual*/ BOOL isCursorHidden();
|
||||
/*virtual*/ void setCursor(ECursorType cursor);
|
||||
/*virtual*/ void updateCursor();
|
||||
/*virtual*/ ECursorType getCursor() const;
|
||||
/*virtual*/ void captureMouse();
|
||||
/*virtual*/ void releaseMouse();
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ public:
|
|||
/*virtual*/ void showCursorFromMouseMove() {};
|
||||
/*virtual*/ void hideCursorUntilMouseMove() {};
|
||||
/*virtual*/ BOOL isCursorHidden() {return FALSE;};
|
||||
/*virtual*/ void setCursor(ECursorType cursor) {};
|
||||
/*virtual*/ void updateCursor() {};
|
||||
//virtual ECursorType getCursor() { return mCurrentCursor; };
|
||||
/*virtual*/ void captureMouse() {};
|
||||
/*virtual*/ void releaseMouse() {};
|
||||
|
|
|
|||
|
|
@ -1920,6 +1920,8 @@ void LLWindowSDL::gatherInput()
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
updateCursor();
|
||||
|
||||
#if LL_X11
|
||||
// This is a good time to stop flashing the icon if our mFlashTimer has
|
||||
|
|
@ -2006,7 +2008,7 @@ static SDL_Cursor *makeSDLCursorFromBMP(const char *filename, int hotx, int hoty
|
|||
return sdlcursor;
|
||||
}
|
||||
|
||||
void LLWindowSDL::setCursor(ECursorType cursor)
|
||||
void LLWindowSDL::updateCursor()
|
||||
{
|
||||
if (ATIbug) {
|
||||
// cursor-updating is very flaky when this bug is
|
||||
|
|
@ -2014,11 +2016,11 @@ void LLWindowSDL::setCursor(ECursorType cursor)
|
|||
return;
|
||||
}
|
||||
|
||||
if (mCurrentCursor != cursor)
|
||||
if (mCurrentCursor != mNextCursor)
|
||||
{
|
||||
if (cursor < UI_CURSOR_COUNT)
|
||||
if (mNextCursor < UI_CURSOR_COUNT)
|
||||
{
|
||||
SDL_Cursor *sdlcursor = mSDLCursors[cursor];
|
||||
SDL_Cursor *sdlcursor = mSDLCursors[mNextCursor];
|
||||
// Try to default to the arrow for any cursors that
|
||||
// did not load correctly.
|
||||
if (!sdlcursor && mSDLCursors[UI_CURSOR_ARROW])
|
||||
|
|
@ -2026,9 +2028,9 @@ void LLWindowSDL::setCursor(ECursorType cursor)
|
|||
if (sdlcursor)
|
||||
SDL_SetCursor(sdlcursor);
|
||||
} else {
|
||||
llwarns << "Tried to set invalid cursor number " << cursor << llendl;
|
||||
llwarns << "Tried to set invalid cursor number " << mNextCursor << llendl;
|
||||
}
|
||||
mCurrentCursor = cursor;
|
||||
mCurrentCursor = mNextCursor;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ public:
|
|||
/*virtual*/ void showCursorFromMouseMove();
|
||||
/*virtual*/ void hideCursorUntilMouseMove();
|
||||
/*virtual*/ BOOL isCursorHidden();
|
||||
/*virtual*/ void setCursor(ECursorType cursor);
|
||||
/*virtual*/ void updateCursor();
|
||||
/*virtual*/ void captureMouse();
|
||||
/*virtual*/ void releaseMouse();
|
||||
/*virtual*/ void setMouseClipping( BOOL b );
|
||||
|
|
|
|||
|
|
@ -1667,18 +1667,18 @@ void LLWindowWin32::initCursors()
|
|||
|
||||
|
||||
|
||||
void LLWindowWin32::setCursor(ECursorType cursor)
|
||||
void LLWindowWin32::updateCursor()
|
||||
{
|
||||
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 )
|
||||
{
|
||||
mCurrentCursor = cursor;
|
||||
SetCursor( mCursor[cursor] );
|
||||
mCurrentCursor = mNextCursor;
|
||||
SetCursor( mCursor[mNextCursor] );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1760,6 +1760,8 @@ void LLWindowWin32::gatherInput()
|
|||
|
||||
mInputProcessingPaused = FALSE;
|
||||
|
||||
updateCursor();
|
||||
|
||||
// clear this once we've processed all mouse messages that might have occurred after
|
||||
// we slammed the mouse position
|
||||
mMousePositionModified = FALSE;
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ public:
|
|||
/*virtual*/ void showCursorFromMouseMove();
|
||||
/*virtual*/ void hideCursorUntilMouseMove();
|
||||
/*virtual*/ BOOL isCursorHidden();
|
||||
/*virtual*/ void setCursor(ECursorType cursor);
|
||||
/*virtual*/ void updateCursor();
|
||||
/*virtual*/ ECursorType getCursor() const;
|
||||
/*virtual*/ void captureMouse();
|
||||
/*virtual*/ void releaseMouse();
|
||||
|
|
|
|||
Loading…
Reference in New Issue