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

[macOS] Fix popup topmost #7076

Closed
wants to merge 3 commits into from
Closed

[macOS] Fix popup topmost #7076

wants to merge 3 commits into from

Conversation

maxkatz6
Copy link
Member

@maxkatz6 maxkatz6 commented Dec 6, 2021

What is the current behavior?

Right now macOS implementation of popup has two problems with topmost:

  1. Initial Popup.Topmost=false value acts like it's "true". I.e. popup is always topmost.
  2. Setting Popup.Topmost=true changes window type from NSPopUpMenuWindowLevel to NSFloatingWindowLevel (not really an issue, I think, but unwanted)
  3. Setting Popup.Topmost=false after it was set to true once, will reset it to NSNormalWindowLevel. It will cause popup to go behind of parent window.
Screen.Recording.2021-12-05.at.11.03.09.PM.mov

What is the updated/expected behavior with this PR?

  1. Topmost value doesn't affects NSPopUpMenuWindowLevel type
  2. When window is deactivated, popup is hiding, so it's not staying top most

NOTE
This PR introduces another issue. Now when parent loses focus, but still visible on screen, popup will hide anyway. See the video. Workaround is easy - set Topmost=true, so this popup will act as it was before this PR. So I don't think it block this PR from merging. But ideally this should be fixed as well, preferably by somebody who is more familiar with macos backend.

Screen.Recording.2021-12-05.at.11.10.44.PM.mov

Fixed issues

Partially fixes #4630 and #4227 (only macos)

@grokys grokys requested a review from danwalmsley December 16, 2021 22:15
@jmacato
Copy link
Member

jmacato commented Mar 10, 2022

Closing due to inactivity, @maxkatz6 just reopen this if you're gonna work on this again

@jmacato jmacato closed this Mar 10, 2022
@maxkatz6 maxkatz6 deleted the fix-popup-topmost branch October 26, 2023 05:46
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.

[Bug] Popup with disabled IsLightDismissEnabled works as Topmost
4 participants