summaryrefslogtreecommitdiff
path: root/indra/llwindow/llopenglview-objc.mm
diff options
context:
space:
mode:
authorGeenz <geenz@geenzo.com>2013-07-11 18:59:28 -0400
committerGeenz <geenz@geenzo.com>2013-07-11 18:59:28 -0400
commit72bb473c9ed106cce6baf22ac74a13443d4630e8 (patch)
treee26976648a31a19ba3dd1e1c97cd2ddd03ff5537 /indra/llwindow/llopenglview-objc.mm
parent6fbafaf056d61ab0ab49cc16a998a528f0ea22e8 (diff)
Ensure that the correct method is called when we're simulating a right click.
Diffstat (limited to 'indra/llwindow/llopenglview-objc.mm')
-rw-r--r--indra/llwindow/llopenglview-objc.mm9
1 files changed, 8 insertions, 1 deletions
diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm
index 77c2fc7e19..e5b7681435 100644
--- a/indra/llwindow/llopenglview-objc.mm
+++ b/indra/llwindow/llopenglview-objc.mm
@@ -246,6 +246,7 @@ attributedStringInfo getSegments(NSAttributedString *str)
if ([theEvent modifierFlags] & NSControlKeyMask)
{
callRightMouseDown(mMousePos, mModifiers);
+ mSimulatedRightClick = true;
} else {
if ([theEvent clickCount] >= 2)
{
@@ -258,7 +259,13 @@ attributedStringInfo getSegments(NSAttributedString *str)
- (void) mouseUp:(NSEvent *)theEvent
{
- callLeftMouseUp(mMousePos, mModifiers);
+ if (mSimulatedRightClick)
+ {
+ callRightMouseUp(mMousePos, mModifiers);
+ mSimulatedRightClick = false;
+ } else {
+ callLeftMouseUp(mMousePos, mModifiers);
+ }
}
- (void) rightMouseDown:(NSEvent *)theEvent