|
|
@ -878,7 +878,11 @@ NSArray* AllLoopModes = [NSArray arrayWithObjects: NSDefaultRunLoopMode, NSEvent |
|
|
_lastPixelSize.Width = (int)fsize.width; |
|
|
_lastPixelSize.Width = (int)fsize.width; |
|
|
_lastPixelSize.Height = (int)fsize.height; |
|
|
_lastPixelSize.Height = (int)fsize.height; |
|
|
[self updateRenderTarget]; |
|
|
[self updateRenderTarget]; |
|
|
_parent->BaseEvents->ScalingChanged([_parent->Window backingScaleFactor]); |
|
|
|
|
|
|
|
|
if(_parent != nullptr) |
|
|
|
|
|
{ |
|
|
|
|
|
_parent->BaseEvents->ScalingChanged([_parent->Window backingScaleFactor]); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
[super viewDidChangeBackingProperties]; |
|
|
[super viewDidChangeBackingProperties]; |
|
|
} |
|
|
} |
|
|
@ -924,7 +928,12 @@ NSArray* AllLoopModes = [NSArray arrayWithObjects: NSDefaultRunLoopMode, NSEvent |
|
|
auto modifiers = [self getModifiers:[event modifierFlags]]; |
|
|
auto modifiers = [self getModifiers:[event modifierFlags]]; |
|
|
|
|
|
|
|
|
[self becomeFirstResponder]; |
|
|
[self becomeFirstResponder]; |
|
|
_parent->BaseEvents->RawMouseEvent(type, timestamp, modifiers, point, delta); |
|
|
|
|
|
|
|
|
if(_parent != nullptr) |
|
|
|
|
|
{ |
|
|
|
|
|
_parent->BaseEvents->RawMouseEvent(type, timestamp, modifiers, point, delta); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
[super mouseMoved:event]; |
|
|
[super mouseMoved:event]; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -1018,7 +1027,10 @@ NSArray* AllLoopModes = [NSArray arrayWithObjects: NSDefaultRunLoopMode, NSEvent |
|
|
auto timestamp = [event timestamp] * 1000; |
|
|
auto timestamp = [event timestamp] * 1000; |
|
|
auto modifiers = [self getModifiers:[event modifierFlags]]; |
|
|
auto modifiers = [self getModifiers:[event modifierFlags]]; |
|
|
|
|
|
|
|
|
_lastKeyHandled = _parent->BaseEvents->RawKeyEvent(type, timestamp, modifiers, key); |
|
|
if(_parent != nullptr) |
|
|
|
|
|
{ |
|
|
|
|
|
_lastKeyHandled = _parent->BaseEvents->RawKeyEvent(type, timestamp, modifiers, key); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
- (BOOL)performKeyEquivalent:(NSEvent *)event |
|
|
- (BOOL)performKeyEquivalent:(NSEvent *)event |
|
|
@ -1105,7 +1117,10 @@ NSArray* AllLoopModes = [NSArray arrayWithObjects: NSDefaultRunLoopMode, NSEvent |
|
|
{ |
|
|
{ |
|
|
if(!_lastKeyHandled) |
|
|
if(!_lastKeyHandled) |
|
|
{ |
|
|
{ |
|
|
_lastKeyHandled = _parent->BaseEvents->RawTextInputEvent(0, [string UTF8String]); |
|
|
if(_parent != nullptr) |
|
|
|
|
|
{ |
|
|
|
|
|
_lastKeyHandled = _parent->BaseEvents->RawTextInputEvent(0, [string UTF8String]); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -1372,7 +1387,11 @@ NSArray* AllLoopModes = [NSArray arrayWithObjects: NSDefaultRunLoopMode, NSEvent |
|
|
|
|
|
|
|
|
[NSApp setMenu:_menu]; |
|
|
[NSApp setMenu:_menu]; |
|
|
|
|
|
|
|
|
_parent->BaseEvents->Activated(); |
|
|
if(_parent != nullptr) |
|
|
|
|
|
{ |
|
|
|
|
|
_parent->BaseEvents->Activated(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
[super becomeKeyWindow]; |
|
|
[super becomeKeyWindow]; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@ -1449,8 +1468,12 @@ NSArray* AllLoopModes = [NSArray arrayWithObjects: NSDefaultRunLoopMode, NSEvent |
|
|
- (void)windowDidMove:(NSNotification *)notification |
|
|
- (void)windowDidMove:(NSNotification *)notification |
|
|
{ |
|
|
{ |
|
|
AvnPoint position; |
|
|
AvnPoint position; |
|
|
_parent->GetPosition(&position); |
|
|
|
|
|
_parent->BaseEvents->PositionChanged(position); |
|
|
if(_parent != nullptr) |
|
|
|
|
|
{ |
|
|
|
|
|
_parent->GetPosition(&position); |
|
|
|
|
|
_parent->BaseEvents->PositionChanged(position); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
@end |
|
|
@end |
|
|
|
|
|
|
|
|
|