From b75d2f7c3f955ce98064e688e61f5fdf785b1ed8 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Fri, 12 Sep 2014 11:30:52 +0300 Subject: MAINT-3666 FIXED Update modifiers when viewer window becomes key window --- indra/llwindow/llopenglview-objc.mm | 9 +++++++++ 1 file changed, 9 insertions(+) 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]; -- cgit v1.2.3