Browse Source
Merge pull request #4642 from AvaloniaUI/fixes/4640-show-fullscreen-win32
Ensure windows set to fullscreen are shown.
pull/4644/head
danwalmsley
6 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/Windows/Avalonia.Win32/WindowImpl.cs
|
|
|
@ -853,7 +853,7 @@ namespace Avalonia.Win32 |
|
|
|
|
|
|
|
private void ShowWindow(WindowState state) |
|
|
|
{ |
|
|
|
ShowWindowCommand command; |
|
|
|
ShowWindowCommand? command; |
|
|
|
|
|
|
|
var newWindowProperties = _windowProperties; |
|
|
|
|
|
|
|
@ -875,8 +875,8 @@ namespace Avalonia.Win32 |
|
|
|
|
|
|
|
case WindowState.FullScreen: |
|
|
|
newWindowProperties.IsFullScreen = true; |
|
|
|
UpdateWindowProperties(newWindowProperties); |
|
|
|
return; |
|
|
|
command = IsWindowVisible(_hwnd) ? (ShowWindowCommand?)null : ShowWindowCommand.Restore; |
|
|
|
break; |
|
|
|
|
|
|
|
default: |
|
|
|
throw new ArgumentException("Invalid WindowState."); |
|
|
|
@ -884,7 +884,10 @@ namespace Avalonia.Win32 |
|
|
|
|
|
|
|
UpdateWindowProperties(newWindowProperties); |
|
|
|
|
|
|
|
UnmanagedMethods.ShowWindow(_hwnd, command); |
|
|
|
if (command.HasValue) |
|
|
|
{ |
|
|
|
UnmanagedMethods.ShowWindow(_hwnd, command.Value); |
|
|
|
} |
|
|
|
|
|
|
|
if (state == WindowState.Maximized) |
|
|
|
{ |
|
|
|
|