summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llwindow/llopenglview-objc.h1
-rw-r--r--indra/llwindow/llopenglview-objc.mm9
2 files changed, 9 insertions, 1 deletions
diff --git a/indra/llwindow/llopenglview-objc.h b/indra/llwindow/llopenglview-objc.h
index f895aae577..71149f8561 100644
--- a/indra/llwindow/llopenglview-objc.h
+++ b/indra/llwindow/llopenglview-objc.h
@@ -41,6 +41,7 @@
bool mHasMarkedText;
unsigned int mMarkedTextLength;
bool mMarkedTextAllowed;
+ bool mSimulatedRightClick;
}
- (id) initWithSamples:(NSUInteger)samples;
- (id) initWithSamples:(NSUInteger)samples andVsync:(BOOL)vsync;
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