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

Win32 - Ensure owner topmost flag is set if its topmost when showing a owned window #16104

Merged
merged 4 commits into from
Jun 26, 2024

Conversation

emmauss
Copy link
Contributor

@emmauss emmauss commented Jun 24, 2024

What does the pull request do?

If a window with an owner is being shown, and the owner is Topmost, ensure the flags for topmost window is set for that owner.

What is the current behavior?

Topmost flag on owner isn't being respected for owned windows when being shown, making them appear behind the owner.
This is the behavior currently

  1. Main Window.Topmost is true
  2. Main Window shows, Topmost flag is set
  3. Main Window remains topmost
  4. Child window is created, shown with main window as owner
  5. Child window appears behind main window
  6. Main window still has Topmost flag and appears above every window. Child doesn't have topmost exstyle flag

On Wpf, child will appear above main window in 5, and will have the topmost ex style flag in 6, but not the Topmost window flag

What is the updated/expected behavior with this PR?

How was the solution implemented (if it's not obvious)?

If the owner window is Topmost, the HWND_TOPMOST is set once more before the owned window is shown. This only needs to be set once.

Checklist

Breaking changes

Obsoletions / Deprecations

Fixed issues

@emmauss emmauss changed the title Win32 - Ensure owner topmost is flag if it's topmost when showing a owned window Win32 - Ensure owner topmost flag is set if its topmost when showing a owned window Jun 24, 2024
@emmauss emmauss force-pushed the win32_ensure_topmost branch from 593b1c2 to a627fe8 Compare June 24, 2024 15:23
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0049221-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0049313-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0049416-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@maxkatz6
Copy link
Member

Seems like integration tests are failing

@emmauss emmauss force-pushed the win32_ensure_topmost branch from a1708c3 to 3615817 Compare June 26, 2024 08:04
@maxkatz6 maxkatz6 enabled auto-merge June 26, 2024 08:10
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0049482-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@emmauss emmauss force-pushed the win32_ensure_topmost branch from 3615817 to 6f11b3a Compare June 26, 2024 11:23
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0049488-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@maxkatz6 maxkatz6 added this pull request to the merge queue Jun 26, 2024
Merged via the queue into master with commit fc26fb6 Jun 26, 2024
11 checks passed
@maxkatz6 maxkatz6 deleted the win32_ensure_topmost branch June 26, 2024 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants