Skip to content
Snippets Groups Projects
Commit b75d2f7c authored by Mnikolenko ProductEngine's avatar Mnikolenko ProductEngine
Browse files

MAINT-3666 FIXED Update modifiers when viewer window becomes key window

parent 7615008e
No related branches found
No related tags found
No related merge requests found
...@@ -133,6 +133,10 @@ attributedStringInfo getSegments(NSAttributedString *str) ...@@ -133,6 +133,10 @@ attributedStringInfo getSegments(NSAttributedString *str)
[[NSNotificationCenter defaultCenter] addObserver:self [[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(windowDidDeminiaturize:) name:NSWindowDidDeminiaturizeNotification selector:@selector(windowDidDeminiaturize:) name:NSWindowDidDeminiaturizeNotification
object:[self window]]; object:[self window]];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(windowDidBecomeKey:) name:NSWindowDidBecomeKeyNotification
object:[self window]];
} }
- (void)setOldResize:(bool)oldresize - (void)setOldResize:(bool)oldresize
...@@ -159,6 +163,11 @@ attributedStringInfo getSegments(NSAttributedString *str) ...@@ -159,6 +163,11 @@ attributedStringInfo getSegments(NSAttributedString *str)
callWindowUnhide(); callWindowUnhide();
} }
- (void)windowDidBecomeKey:(NSNotification *)notification;
{
mModifiers = [NSEvent modifierFlags];
}
- (void)dealloc - (void)dealloc
{ {
[[NSNotificationCenter defaultCenter] removeObserver:self]; [[NSNotificationCenter defaultCenter] removeObserver:self];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment