Browse Source
Merge pull request #2182 from jeffreye/fixes/osx-start-minimized
Fix start minimized bug
layers-wtf-repro
Nikita Tsukanov
8 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
20 additions and
3 deletions
-
native/Avalonia.Native/src/OSX/window.mm
-
src/Avalonia.Native/PlatformThreadingInterface.cs
|
|
|
@ -425,7 +425,7 @@ private: |
|
|
|
[[Window parentWindow] removeChildWindow:Window]; |
|
|
|
WindowBaseImpl::Show(); |
|
|
|
|
|
|
|
return SetWindowState(_lastWindowState); |
|
|
|
return SetWindowState(Normal); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -1184,6 +1184,25 @@ NSArray* AllLoopModes = [NSArray arrayWithObjects: NSDefaultRunLoopMode, NSEvent |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
- (void)windowDidMiniaturize:(NSNotification *)notification |
|
|
|
{ |
|
|
|
auto parent = dynamic_cast<IWindowStateChanged*>(_parent.operator->()); |
|
|
|
|
|
|
|
if(parent != nullptr) |
|
|
|
{ |
|
|
|
parent->WindowStateChanged(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
- (void)windowDidDeminiaturize:(NSNotification *)notification |
|
|
|
{ |
|
|
|
auto parent = dynamic_cast<IWindowStateChanged*>(_parent.operator->()); |
|
|
|
|
|
|
|
if(parent != nullptr) |
|
|
|
{ |
|
|
|
parent->WindowStateChanged(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
- (BOOL)windowShouldZoom:(NSWindow *)window toFrame:(NSRect)newFrame |
|
|
|
{ |
|
|
|
|
|
|
|
@ -68,8 +68,6 @@ namespace Avalonia.Native |
|
|
|
lock (l) |
|
|
|
{ |
|
|
|
cancellation?.Cancel(); |
|
|
|
cancellation?.Dispose(); |
|
|
|
cancellation = null; |
|
|
|
} |
|
|
|
}); |
|
|
|
try |
|
|
|
|