diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2019-04-26 11:17:53 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2019-04-26 11:17:53 -0400 |
commit | 0d596aa4de2f583862274350ce6287c0ed8c2bec (patch) | |
tree | 90a6ca5b29d5c99b585233d059e16dccc23a2e19 /indra/llwindow/llopenglview-objc.mm | |
parent | 70aa89f708254c47766f4629e9131ea492829129 (diff) | |
parent | 85b431d5137886927efef35ca558bc8a998a5212 (diff) |
Automated merge with file:///Users/nat/linden/viewer-gridselect
Diffstat (limited to 'indra/llwindow/llopenglview-objc.mm')
-rw-r--r-- | indra/llwindow/llopenglview-objc.mm | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm index 54a4793b2d..33eed7227a 100644 --- a/indra/llwindow/llopenglview-objc.mm +++ b/indra/llwindow/llopenglview-objc.mm @@ -343,6 +343,10 @@ attributedStringInfo getSegments(NSAttributedString *str) - (void) mouseDown:(NSEvent *)theEvent { + NSPoint mPoint = gHiDPISupport ? [self convertPointToBacking:[theEvent locationInWindow]] : [theEvent locationInWindow]; + mMousePos[0] = mPoint.x; + mMousePos[1] = mPoint.y; + // Apparently people still use this? if ([theEvent modifierFlags] & NSCommandKeyMask && !([theEvent modifierFlags] & NSControlKeyMask) && @@ -380,11 +384,17 @@ attributedStringInfo getSegments(NSAttributedString *str) - (void) rightMouseDown:(NSEvent *)theEvent { + NSPoint mPoint = gHiDPISupport ? [self convertPointToBacking:[theEvent locationInWindow]] : [theEvent locationInWindow]; + mMousePos[0] = mPoint.x; + mMousePos[1] = mPoint.y; callRightMouseDown(mMousePos, [theEvent modifierFlags]); } - (void) rightMouseUp:(NSEvent *)theEvent { + NSPoint mPoint = gHiDPISupport ? [self convertPointToBacking:[theEvent locationInWindow]] : [theEvent locationInWindow]; + mMousePos[0] = mPoint.x; + mMousePos[1] = mPoint.y; callRightMouseUp(mMousePos, [theEvent modifierFlags]); } @@ -431,11 +441,17 @@ attributedStringInfo getSegments(NSAttributedString *str) - (void) otherMouseDown:(NSEvent *)theEvent { + NSPoint mPoint = gHiDPISupport ? [self convertPointToBacking:[theEvent locationInWindow]] : [theEvent locationInWindow]; + mMousePos[0] = mPoint.x; + mMousePos[1] = mPoint.y; callMiddleMouseDown(mMousePos, [theEvent modifierFlags]); } - (void) otherMouseUp:(NSEvent *)theEvent { + NSPoint mPoint = gHiDPISupport ? [self convertPointToBacking:[theEvent locationInWindow]] : [theEvent locationInWindow]; + mMousePos[0] = mPoint.x; + mMousePos[1] = mPoint.y; callMiddleMouseUp(mMousePos, [theEvent modifierFlags]); } |