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

Mac window disconnected from titlebar #82

Open
aduros opened this issue Jan 23, 2022 · 2 comments
Open

Mac window disconnected from titlebar #82

aduros opened this issue Jan 23, 2022 · 2 comments

Comments

@aduros
Copy link
Contributor

aduros commented Jan 23, 2022

This strange bug was reported by a user on Mac: aduros/wasm4#327

screenshot

It seems to do with going in and out of fullscreen. Opening it here in case others have seen it or know any workarounds.

@kippesp
Copy link
Contributor

kippesp commented May 14, 2022

I'm evaluating minifb and decided to look further into this issue. I was able to duplicate this behavior on Monterey when using the Metal API. It also duplicates if I grow the window size. A build without Metal does not duplicate the issue.

As a work around, the resize control can be disabled which will also disable the full-screen window control. For my application, I'll go this route since I need to render a pixel buffer that is a fixed size.

I did some research on the behavior and think this is related to having the MTKView as the windows immediate content. Although I didn't solve it, I think if the MTKView were placed in another view or layer, the outer view would maintain the titlebar connection.

I'm afraid I don't know minifb that well across OSes to say what behavior is desired.

See https://localcoder.org/resizing-mtkview-scales-old-content-before-redraw
See https://developer.apple.com/documentation/appkit/nsstackview

@Darky-Lucera
Copy link
Collaborator

Thanks for the information

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

No branches or pull requests

3 participants