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 doesn't open in fullscreen #306

Closed
freesig opened this issue May 9, 2019 · 4 comments · Fixed by #452
Closed

MacOs doesn't open in fullscreen #306

freesig opened this issue May 9, 2019 · 4 comments · Fixed by #452

Comments

@freesig
Copy link
Collaborator

freesig commented May 9, 2019

If you call

    let window_id = app
        .new_window()
        .with_fullscreen(true)
        .view(view)
        .build()
        .unwrap();

It just opens up maximized.
I'm not sure if this happens on other OS.

@freesig freesig added the bug label May 9, 2019
@mitchmindtree
Copy link
Member

It fullscreens correctly on X11 Linux I believe.

Does it fullscreen properly on macos when you use Cmd+F? That calls set_fullscreen under the hood if the window is already created.

I'd imagine there would be an issue for this in winit as we pretty much just call the winit methods directly under the hood.

@freesig
Copy link
Collaborator Author

freesig commented May 11, 2019

Yep you can get to fullscreen with Cmd+F. I'll have a dig into this when I get a chance. It crashes though due to the segfault bug.

@freesig
Copy link
Collaborator Author

freesig commented May 11, 2019

let mon = app.main_window().current_monitor();
app.main_window().set_fullscreen(Some(mon));

This works actually. I think maybe it just needs the MonitorId

@vl4dimir
Copy link

@freesig is there a way to start the app in fullscreen immediately? This is sort of a chicken and egg problem, you need the MonitorId to create a window with with_fullscreen (not set_fullscreen after the fact), but the only way I've found to get MonitorId is if I already have a window. 😆

This wouldn't be that important if window resizing worked on macOS, but it is currently unusable due to #372. So at the moment, no fullscreen windows on macOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants