Browse Source
Merge branch 'master' into 9705-protected-owning-grid
pull/9727/head
Max Katz
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
14 additions and
7 deletions
-
src/Windows/Avalonia.Win32/Interop/UnmanagedMethods.cs
-
src/Windows/Avalonia.Win32/WindowImpl.AppWndProc.cs
-
src/Windows/Avalonia.Win32/WindowImpl.cs
|
|
|
@ -1409,7 +1409,7 @@ namespace Avalonia.Win32.Interop |
|
|
|
[DllImport("user32.dll")] |
|
|
|
public static extern bool TranslateMessage(ref MSG lpMsg); |
|
|
|
|
|
|
|
[DllImport("user32.dll")] |
|
|
|
[DllImport("user32.dll", CharSet = CharSet.Unicode)] |
|
|
|
public static extern bool UnregisterClass(string lpClassName, IntPtr hInstance); |
|
|
|
|
|
|
|
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Unicode, EntryPoint = "SetWindowTextW")] |
|
|
|
|
|
|
|
@ -10,6 +10,7 @@ using Avalonia.Controls.Remote; |
|
|
|
using Avalonia.Input; |
|
|
|
using Avalonia.Input.Raw; |
|
|
|
using Avalonia.Platform; |
|
|
|
using Avalonia.Threading; |
|
|
|
using Avalonia.Win32.Automation; |
|
|
|
using Avalonia.Win32.Input; |
|
|
|
using Avalonia.Win32.Interop.Automation; |
|
|
|
@ -106,6 +107,9 @@ namespace Avalonia.Win32 |
|
|
|
_touchDevice?.Dispose(); |
|
|
|
//Free other resources
|
|
|
|
Dispose(); |
|
|
|
|
|
|
|
// Schedule cleanup of anything that requires window to be destroyed
|
|
|
|
Dispatcher.UIThread.Post(AfterCloseCleanup); |
|
|
|
return IntPtr.Zero; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -643,12 +643,6 @@ namespace Avalonia.Win32 |
|
|
|
_hwnd = IntPtr.Zero; |
|
|
|
} |
|
|
|
|
|
|
|
if (_className != null) |
|
|
|
{ |
|
|
|
UnregisterClass(_className, GetModuleHandle(null)); |
|
|
|
_className = null; |
|
|
|
} |
|
|
|
|
|
|
|
_framebuffer.Dispose(); |
|
|
|
} |
|
|
|
|
|
|
|
@ -1144,6 +1138,15 @@ namespace Avalonia.Win32 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private void AfterCloseCleanup() |
|
|
|
{ |
|
|
|
if (_className != null) |
|
|
|
{ |
|
|
|
UnregisterClass(_className, GetModuleHandle(null)); |
|
|
|
_className = null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private void MaximizeWithoutCoveringTaskbar() |
|
|
|
{ |
|
|
|
IntPtr monitor = MonitorFromWindow(_hwnd, MONITOR.MONITOR_DEFAULTTONEAREST); |
|
|
|
|