-
Notifications
You must be signed in to change notification settings - Fork 912
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: create unfocused window #3072
Comments
Have you looked through the platform-specific extensions in |
Thanks, I hadn't seen that. Unfortunately even with let event_loop = EventLoopBuilder::new()
.with_activation_policy(ActivationPolicy::Accessory)
.build(); The new window steals focus. I realize that my report is a bit all-over-the-place. (I just did some editing there) To clarify, the behavior I'm after is:
And in every other way, I would like for it to be normal window. Any mention of the status bar is me not realizing this is a separate concept from focus in macos.
|
Hmm, could you try following the advice in the README, and create your window inside |
And also try |
Ooh, thank you! let event_loop = EventLoopBuilder::new()
.with_activate_ignoring_other_apps(false)
.build(); Does seem to make the situation better. The docs for
I hadn't tried that because outside of this modified winit example the windows are being created within the event loop. But for thoroughness I checked that out and a workaround mentioned in #2051 and |
So I guess this is something close to what I was guessing just above and there's no bug here. Really appreciate the help. |
The reason we set Glad that you figured it out though. |
Using macos 13.4.1.
Testing with the main branch.
I'd like to create a single window that begins its life visible but unfocused, never stealing focus.
with_active(false)
seems like it should accomplish this, but with that, the new window still appears on top of every other window, reacts to key presses, etc.Even with
.with_window_level(winit::window::WindowLevel::AlwaysOnBottom)
and.with_visible(false)
, the window seems to take focus away from the currently focused window, interrupting typing (but doesn't seem to react to keypresses itself).Repro:
The text was updated successfully, but these errors were encountered: