Browse Source

Fix/win32 no border sysmenu (#19923)

* remove ws_sysmenu from non full decoration windows

* update decorated window sample to not resize on maximize
fixes/gpu-interop-check-dedicated-allocation-needed
Emmanuel Hansen 3 months ago
committed by GitHub
parent
commit
3ed7b9e9fa
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 3
      samples/ControlCatalog/DecoratedWindow.xaml.cs
  2. 2
      src/Windows/Avalonia.Win32/WindowImpl.cs

3
samples/ControlCatalog/DecoratedWindow.xaml.cs

@ -19,7 +19,8 @@ namespace ControlCatalog
ctl.Cursor = new Cursor(cursor);
ctl.PointerPressed += (i, e) =>
{
BeginResizeDrag(edge, e);
if (WindowState == WindowState.Normal)
BeginResizeDrag(edge, e);
};
}

2
src/Windows/Avalonia.Win32/WindowImpl.cs

@ -1481,7 +1481,7 @@ namespace Avalonia.Win32
else
style &= ~WindowStyles.WS_MAXIMIZEBOX;
const WindowStyles fullDecorationFlags = WindowStyles.WS_CAPTION | WindowStyles.WS_BORDER;
const WindowStyles fullDecorationFlags = WindowStyles.WS_CAPTION | WindowStyles.WS_BORDER | WindowStyles.WS_SYSMENU;
if (newProperties.Decorations == SystemDecorations.Full)
{

Loading…
Cancel
Save