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
Allow custom window level when sending window to top #7296
Conversation
Pretty cool, mind updating the docs as well for this? https://github.com/electron/electron/blob/master/docs/api/browser-window.md#winsetalwaysontopflag |
Might be useful to include the possible values as well of these https://developer.apple.com/reference/appkit/nswindow/1664726-window_levels#symbols in the docs |
@kevinsawicki Thanks! I added the details to the docs. Currently the parameter is an integer, not a mac window level constant. I like that idea, but I'm not sure how to take a constant in as a string and then convert it to the constant value in the native window controller. |
I can help you update it, what do you think about these string value names for the different integer values:
|
Looks great! I committed my best attempt. I'm getting some errors with the string declarations. |
@adammeyer I pushed a change that gets things compiling. When testing this though it is kind of hard to tell the differences between these levels, they seem to all be very similar. Can you expand on how you plan to use it a bit? |
I would like to open a window that fills the screen and is above the menu bar, without the animations that come with making a window "fullscreen". Kind of like showing a PowerPoint presentation. I could also see it being used if you wanted multiple windows to always be on top, but one to be the top most of those. |
Which level allows this? Curious to test it locally. |
I believe |
Yes, just confirmed it is |
@kevinsawicki Anything left to add? |
👍 |
@adammeyer I just wanted to tell you that you're my hero – this will be very useful on wulkano/kap 😄 |
This allows for a custom window level to be set when sending a window to the top.
This can be used when the NSFloatingWindowLevel isn't high enough. I have used this to put a window above the top menu bar.