From 794810695928bc628a22b4a47151c1bfde17e068 Mon Sep 17 00:00:00 2001 From: Melissa Date: Sat, 1 Feb 2025 15:21:04 +0100 Subject: [PATCH] Fixed unnecessary window displacement on resize (#18004) * Added new test: changing window size should not change position * Removed unnecessary window placement assignment to fix window position shifting due to incorrect workspace coordinate usage * Fixed test because buttons went off the window on tiny screen resolutions * Make test Windows specific * Use `Bounds` instead of `Width` and `Height` properties as they are "requested" size rather than actual size (see #18060) --- .../IntegrationTestApp/ShowWindowTest.axaml | 6 +++++- .../IntegrationTestApp/ShowWindowTest.axaml.cs | 4 ++++ src/Windows/Avalonia.Win32/WindowImpl.cs | 6 ------ .../WindowTests.cs | 18 ++++++++++++++++++ 4 files changed, 27 insertions(+), 7 deletions(-) diff --git a/samples/IntegrationTestApp/ShowWindowTest.axaml b/samples/IntegrationTestApp/ShowWindowTest.axaml index 9e194f0e7d..50ebecd5ba 100644 --- a/samples/IntegrationTestApp/ShowWindowTest.axaml +++ b/samples/IntegrationTestApp/ShowWindowTest.axaml @@ -53,7 +53,11 @@