diff options
| author | Monroe Linden <monroe@lindenlab.com> | 2010-01-04 17:43:25 -0800 | 
|---|---|---|
| committer | Monroe Linden <monroe@lindenlab.com> | 2010-01-04 17:43:25 -0800 | 
| commit | b282f04b31f60a3ddd9dcbd27eed2d2226a40e09 (patch) | |
| tree | 74a553779d7de2d1ae8363443b69b132bd441441 /indra | |
| parent | faad5eff72f3cfa9ec113bfa861e850e7dd9ef9b (diff) | |
Changed async picks in LLToolPie::handleMouseDown and LLToolPie::handleRightMouseDown to sync.
This fixes EXT-3658 ("DEV-44422 webprim doesn't get mouse up events from the Mac trackpad").
Reviewed by Richard.
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/lltoolpie.cpp | 27 | ||||
| -rw-r--r-- | indra/newview/lltoolpie.h | 3 | 
2 files changed, 11 insertions, 19 deletions
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp index b1d09eccba..5f66e6b409 100644 --- a/indra/newview/lltoolpie.cpp +++ b/indra/newview/lltoolpie.cpp @@ -101,16 +101,13 @@ BOOL LLToolPie::handleAnyMouseClick(S32 x, S32 y, MASK mask, EClickType clicktyp  BOOL LLToolPie::handleMouseDown(S32 x, S32 y, MASK mask)  {  	//left mouse down always picks transparent -	gViewerWindow->pickAsync(x, y, mask, leftMouseCallback, TRUE); +	mPick = gViewerWindow->pickImmediate(x, y, TRUE); +	mPick.mKeyMask = mask;  	mGrabMouseButtonDown = TRUE; -	return TRUE; -} +	 +	pickLeftMouseDownCallback(); -// static -void LLToolPie::leftMouseCallback(const LLPickInfo& pick_info) -{ -	LLToolPie::getInstance()->mPick = pick_info; -	LLToolPie::getInstance()->pickLeftMouseDownCallback(); +	return TRUE;  }  // Spawn context menus on right mouse down so you can drag over and select @@ -118,8 +115,13 @@ void LLToolPie::leftMouseCallback(const LLPickInfo& pick_info)  BOOL LLToolPie::handleRightMouseDown(S32 x, S32 y, MASK mask)  {  	// don't pick transparent so users can't "pay" transparent objects -	gViewerWindow->pickAsync(x, y, mask, rightMouseCallback, FALSE); +	mPick = gViewerWindow->pickImmediate(x, y, FALSE); +	mPick.mKeyMask = mask; +  	// claim not handled so UI focus stays same +	 +	pickRightMouseDownCallback(); +	  	return FALSE;  } @@ -134,13 +136,6 @@ BOOL LLToolPie::handleScrollWheel(S32 x, S32 y, S32 clicks)  	return LLViewerMediaFocus::getInstance()->handleScrollWheel(x, y, clicks);  } -// static -void LLToolPie::rightMouseCallback(const LLPickInfo& pick_info) -{ -	LLToolPie::getInstance()->mPick = pick_info; -	LLToolPie::getInstance()->pickRightMouseDownCallback(); -} -  // True if you selected an object.  BOOL LLToolPie::pickLeftMouseDownCallback()  { diff --git a/indra/newview/lltoolpie.h b/indra/newview/lltoolpie.h index 3660c68552..5f0e28fa95 100644 --- a/indra/newview/lltoolpie.h +++ b/indra/newview/lltoolpie.h @@ -71,9 +71,6 @@ public:  	LLObjectSelection*	getLeftClickSelection() { return (LLObjectSelection*)mLeftClickSelection; }  	void 				resetSelection(); -	static void			leftMouseCallback(const LLPickInfo& pick_info); -	static void			rightMouseCallback(const LLPickInfo& pick_info); -  	static void			selectionPropertiesReceived();  	static void			showAvatarInspector(const LLUUID& avatar_id);  | 
