-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Try to fix flaky window decorations tests on Windows. #16597
Conversation
Toggling the window decorations can cause the window to be moved off screen, causing integration test failures. Until this bug is fixed, detect this and move the window to the screen origin. See #11411.
You can test this PR using the following package version. |
Regarding the screen size, it's already supposed to be changed:
Not sure if that ever worked, or if CI agents don't support that resolution. |
You can test this PR using the following package version. |
e.Point, | ||
PixelSize.FromSize(ClientSize, DesktopScaling)); | ||
|
||
if (!screen.WorkingArea.Contains(bounds)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't only the position be verified instead of the bounds? This might cause an infinite loop if the window somehow doesn't fit into the working area,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem is when the bottom of the window is moved below the taskbar so we need to verify the bounds (the problem is that this causes the taskbar to be clicked instead of the window).
I guess we should also add a check that the window size is smaller than the working area though to prevent such an infinite loop.
Nope, that doesn't seem to have worked as you can see from the recorded videos. I guess we can remove that line. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merging in hopes to get greens (CI greens)
Toggling the window decorations can cause the window to be moved off screen, causing integration test failures. Until this bug is fixed, detect this and move the window to the screen origin. See #11411.
What does the pull request do?
As mentioned in #16546 (comment), toggling the window decorations on win32 can cause the window to be moved off screen, causing integration test failures. Until this bug is fixed, detect this and move the window to the screen origin (see #11411).
The alternative would be to increase the screen size for integration tests on CI, which would make this problem less likely, but still possible. Unless this hackfix causes other problems it should be more reliable than changing the screen size.