Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add integration tests for checking window sizes on launch when client is extended. #13871

Merged
merged 2 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Windows/Avalonia.Win32/WindowImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,7 @@ private void UpdateWindowProperties(WindowProperties newProperties, bool forceCh
else
SetFullScreen(newProperties.IsFullScreen);

if (!_isFullScreenActive)
if (!_isFullScreenActive && ((oldProperties.Decorations != newProperties.Decorations) || forceChanges))
{
var style = GetStyle();

Expand Down
11 changes: 11 additions & 0 deletions tests/Avalonia.IntegrationTests.Appium/WindowTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,17 @@ public void ShowMode(ShowWindowMode mode)
}
}

[Fact]
public void Extended_Client_Window_Shows_With_Requested_Size()
{
var clientSize = new Size(400, 400);
using var window = OpenWindow(clientSize, ShowWindowMode.NonOwned, WindowStartupLocation.CenterScreen, extendClientArea: true);
var windowState = _session.FindElementByAccessibilityId("CurrentWindowState");
var current = GetWindowInfo();

Assert.Equal(current.ClientSize, clientSize);
}

[Fact]
public void TransparentWindow()
{
Expand Down