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

bug: cannot create an unfocused window on Mac for dev #15025

Open
swarnimarun opened this issue Sep 3, 2024 · 1 comment
Open

bug: cannot create an unfocused window on Mac for dev #15025

swarnimarun opened this issue Sep 3, 2024 · 1 comment
Labels
A-Windowing Platform-agnostic interface layer to run your app in C-Bug An unexpected or incorrect behavior O-MacOS Specific to the MacOS (Apple) desktop operating system S-Needs-Design This issue requires design work to think about how it would best be accomplished

Comments

@swarnimarun
Copy link

Bevy version

v0.14.1

[Optional] Relevant system information

On, MacOS 14.2.1

SystemInfo { os: "MacOS 14.2.1 ", kernel: "23.2.0", cpu: "Apple M1 Pro", core_count: "8", memory: "16.0 GiB" }

What you did

Setting focused false doesn't work when running app from terminal.

        .add_plugins(DefaultPlugins.set(WindowPlugin {
            primary_window: Some(Window {
            	present_mode: bevy::window::PresentMode::Immediate,
                // ignore this two, set as I am using multiple monitors
                position: WindowPosition::Centered(MonitorSelection::Index(0)),
                focused: false, // here!
                ..default()
            }),
            ..default()
        }))

What went wrong

Ideally the window should not grab focus when set to focused false or so I understand from the docs, I might be wrong. In that case I would like an set_active false flag. And maybe we can reword the docs a bit better.

Additional information

You can fix it if you build the event loop directly by setting, with_activate_ignoring_other_apps to false, but I am not sure how to do this with bevy. (better described here, rust-windowing/winit#3072)

I can't seem to be able to access the event loop in any way.
So it might not be a bug, just a skill issue on my part. But I think even if we could, it's at best a workaround.

It's nice to be able to do it, as I can set cargo watch -x run and see my changes instantly. Especially for game jam projects which are small and require quick tweaks/iteration.

Aside:
Awesome work on the project, appreciate the effort from all the bevy folks, I lack time to write my own libs for my hobby indie game dev projects in Rust. So it's awesome to have such a impressive go-to-ish library in Rust for it. :)

@swarnimarun swarnimarun added C-Bug An unexpected or incorrect behavior S-Needs-Triage This issue needs to be labelled labels Sep 3, 2024
@alice-i-cecile alice-i-cecile added A-Windowing Platform-agnostic interface layer to run your app in O-MacOS Specific to the MacOS (Apple) desktop operating system S-Needs-Design This issue requires design work to think about how it would best be accomplished and removed S-Needs-Triage This issue needs to be labelled labels Sep 3, 2024
@TheOddler
Copy link

TheOddler commented Sep 18, 2024

I'm having this problem now too on Linux. Did you ever find a working workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Windowing Platform-agnostic interface layer to run your app in C-Bug An unexpected or incorrect behavior O-MacOS Specific to the MacOS (Apple) desktop operating system S-Needs-Design This issue requires design work to think about how it would best be accomplished
Projects
None yet
Development

No branches or pull requests

3 participants