Browse Source
Merge pull request #3581 from AvaloniaUI/fixes/3544-osx-window-close-crash
Fix: dont crash when closing window on OSX.
pull/3585/head
Jumar Macato
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
7 additions and
4 deletions
-
src/Avalonia.Native/WindowImplBase.cs
|
|
|
@ -162,9 +162,12 @@ namespace Avalonia.Native |
|
|
|
|
|
|
|
void IAvnWindowBaseEvents.Resized(AvnSize size) |
|
|
|
{ |
|
|
|
var s = new Size(size.Width, size.Height); |
|
|
|
_parent._savedLogicalSize = s; |
|
|
|
_parent.Resized?.Invoke(s); |
|
|
|
if (_parent._native != null) |
|
|
|
{ |
|
|
|
var s = new Size(size.Width, size.Height); |
|
|
|
_parent._savedLogicalSize = s; |
|
|
|
_parent.Resized?.Invoke(s); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void IAvnWindowBaseEvents.PositionChanged(AvnPoint position) |
|
|
|
@ -317,7 +320,7 @@ namespace Avalonia.Native |
|
|
|
_native.SetTopMost(value); |
|
|
|
} |
|
|
|
|
|
|
|
public double Scaling => _native.GetScaling(); |
|
|
|
public double Scaling => _native?.GetScaling() ?? 1; |
|
|
|
|
|
|
|
public Action Deactivated { get; set; } |
|
|
|
public Action Activated { get; set; } |
|
|
|
|