|
|
|
@ -12,10 +12,7 @@ namespace Avalonia.Native |
|
|
|
private readonly IAvaloniaNativeFactory _factory; |
|
|
|
private readonly AvaloniaNativePlatformOptions _opts; |
|
|
|
private readonly GlPlatformFeature _glFeature; |
|
|
|
private readonly IAvnWindow _native; |
|
|
|
private bool _isFullScreenActive; |
|
|
|
private Interop.SystemDecorations _lastDecoration; |
|
|
|
|
|
|
|
IAvnWindow _native; |
|
|
|
internal WindowImpl(IAvaloniaNativeFactory factory, AvaloniaNativePlatformOptions opts, |
|
|
|
GlPlatformFeature glFeature) : base(opts, glFeature) |
|
|
|
{ |
|
|
|
@ -42,7 +39,7 @@ namespace Avalonia.Native |
|
|
|
|
|
|
|
bool IAvnWindowEvents.Closing() |
|
|
|
{ |
|
|
|
if (_parent.Closing != null) |
|
|
|
if(_parent.Closing != null) |
|
|
|
{ |
|
|
|
return _parent.Closing(); |
|
|
|
} |
|
|
|
@ -68,17 +65,12 @@ namespace Avalonia.Native |
|
|
|
_native.CanResize = value; |
|
|
|
} |
|
|
|
|
|
|
|
public void SetSystemDecorations(Controls.SystemDecorations decorations) |
|
|
|
public void SetSystemDecorations(Controls.SystemDecorations enabled) |
|
|
|
{ |
|
|
|
_lastDecoration = (Interop.SystemDecorations)decorations; |
|
|
|
|
|
|
|
if (!_isFullScreenActive) |
|
|
|
{ |
|
|
|
_native.SetHasDecorations(_lastDecoration); |
|
|
|
} |
|
|
|
_native.HasDecorations = (Interop.SystemDecorations)enabled; |
|
|
|
} |
|
|
|
|
|
|
|
public void SetTitleBarColor(Avalonia.Media.Color color) |
|
|
|
public void SetTitleBarColor (Avalonia.Media.Color color) |
|
|
|
{ |
|
|
|
_native.SetTitleBarColor(new AvnColor { Alpha = color.A, Red = color.R, Green = color.G, Blue = color.B }); |
|
|
|
} |
|
|
|
@ -100,17 +92,6 @@ namespace Avalonia.Native |
|
|
|
set |
|
|
|
{ |
|
|
|
_native.SetWindowState((AvnWindowState)value); |
|
|
|
|
|
|
|
if (value == WindowState.FullScreen) |
|
|
|
{ |
|
|
|
_isFullScreenActive = true; |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
_isFullScreenActive = false; |
|
|
|
|
|
|
|
_native.SetHasDecorations(_lastDecoration); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|