From 1108a34d1dc063eddf2b0e4991b6391a12686be7 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Tue, 8 Apr 2014 12:37:41 +0300 Subject: MAINT-3907 FIXED Handle pressing of Alt/Shift/Control keys without any other key being pressed simultaneously. --- indra/llwindow/llopenglview-objc.mm | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'indra/llwindow/llopenglview-objc.mm') diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm index 017ea3769c..f7031341eb 100644 --- a/indra/llwindow/llopenglview-objc.mm +++ b/indra/llwindow/llopenglview-objc.mm @@ -398,9 +398,35 @@ attributedStringInfo getSegments(NSAttributedString *str) } } -- (void)flagsChanged:(NSEvent *)theEvent { +- (void)flagsChanged:(NSEvent *)theEvent +{ mModifiers = [theEvent modifierFlags]; callModifier([theEvent modifierFlags]); + + NSInteger mask = 0; + switch([theEvent keyCode]) + { + case 56: + mask = NSShiftKeyMask; + break; + case 58: + mask = NSAlternateKeyMask; + break; + case 59: + mask = NSControlKeyMask; + break; + default: + return; + } + + if (mModifiers & mask) + { + callKeyDown([theEvent keyCode], 0); + } + else + { + callKeyUp([theEvent keyCode], 0); + } } - (BOOL) acceptsFirstResponder -- cgit v1.2.3 From 7d9372b96d8eaa3df6f0b6b1aff67a4b6a710f70 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 4 Sep 2014 14:13:47 +0300 Subject: MAINT-4323 FIXED Mouselook - right-click locks cam position (mac-only) --- indra/llwindow/llopenglview-objc.mm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/llwindow/llopenglview-objc.mm') diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm index f7031341eb..1bb93d05d6 100644 --- a/indra/llwindow/llopenglview-objc.mm +++ b/indra/llwindow/llopenglview-objc.mm @@ -349,9 +349,14 @@ attributedStringInfo getSegments(NSAttributedString *str) callMiddleMouseUp(mMousePos, mModifiers); } +- (void) rightMouseDragged:(NSEvent *)theEvent +{ + [self mouseDragged:theEvent]; +} + - (void) otherMouseDragged:(NSEvent *)theEvent { - + [self mouseDragged:theEvent]; } - (void) scrollWheel:(NSEvent *)theEvent -- cgit v1.2.3 From c62ac0cae77a4dbe7807c7638af5dc708f8c5933 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Thu, 11 Sep 2014 11:59:19 +0300 Subject: MAINT-3569 FIXED Handle window hide/unhide and minimize/unminimize events on mac. --- indra/llwindow/llopenglview-objc.mm | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'indra/llwindow/llopenglview-objc.mm') diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm index 1bb93d05d6..1b5804ec83 100644 --- a/indra/llwindow/llopenglview-objc.mm +++ b/indra/llwindow/llopenglview-objc.mm @@ -124,6 +124,14 @@ attributedStringInfo getSegments(NSAttributedString *str) { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(windowResized:) name:NSWindowDidResizeNotification + object:[self window]]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(windowWillMiniaturize:) name:NSWindowWillMiniaturizeNotification + object:[self window]]; + + [[NSNotificationCenter defaultCenter] addObserver:self + selector:@selector(windowDidDeminiaturize:) name:NSWindowDidDeminiaturizeNotification object:[self window]]; } @@ -141,6 +149,16 @@ attributedStringInfo getSegments(NSAttributedString *str) } } +- (void)windowWillMiniaturize:(NSNotification *)notification; +{ + callWindowHide(); +} + +- (void)windowDidDeminiaturize:(NSNotification *)notification; +{ + callWindowUnhide(); +} + - (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self]; -- cgit v1.2.3