summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMnikolenko ProductEngine <mnikolenko@productengine.com>2014-09-12 11:30:52 +0300
committerMnikolenko ProductEngine <mnikolenko@productengine.com>2014-09-12 11:30:52 +0300
commitb75d2f7c3f955ce98064e688e61f5fdf785b1ed8 (patch)
tree6a2b8ff8e7f1139eeb76ead825098f8dd7936f42
parent7615008efa39786aabf35b13e9717ff5651f43ff (diff)
MAINT-3666 FIXED Update modifiers when viewer window becomes key window
-rw-r--r--indra/llwindow/llopenglview-objc.mm9
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm
index 1b5804ec83..06b96dd1ea 100644
--- a/indra/llwindow/llopenglview-objc.mm
+++ b/indra/llwindow/llopenglview-objc.mm
@@ -133,6 +133,10 @@ attributedStringInfo getSegments(NSAttributedString *str)
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(windowDidDeminiaturize:) name:NSWindowDidDeminiaturizeNotification
object:[self window]];
+
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(windowDidBecomeKey:) name:NSWindowDidBecomeKeyNotification
+ object:[self window]];
}
- (void)setOldResize:(bool)oldresize
@@ -159,6 +163,11 @@ attributedStringInfo getSegments(NSAttributedString *str)
callWindowUnhide();
}
+- (void)windowDidBecomeKey:(NSNotification *)notification;
+{
+ mModifiers = [NSEvent modifierFlags];
+}
+
- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];