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

Weird game display in Sonoma builds #43

Open
angstsmurf opened this issue Oct 8, 2023 · 3 comments
Open

Weird game display in Sonoma builds #43

angstsmurf opened this issue Oct 8, 2023 · 3 comments

Comments

@angstsmurf
Copy link
Contributor

In a build made from the current source (0774cc0) on macOS Sonoma (14.0), Counterfeit Monkey looks very strange after resizing the window:

Skärmavbild 2023-10-08 kl  03 04 11

Even stranger, the display looks correct in the Xcode "Debug View Hierarchy" view:
Skärmavbild 2023-10-08 kl  03 09 41

This is in Xcode 15.0 on an M1 MacBook Air.

@angstsmurf
Copy link
Contributor Author

angstsmurf commented Oct 10, 2023

After browsing the Apple Developer forums, the problem seems to be either that NSView clipToBounds is set to NO by default in Sonoma, or an AppKit bug. See: https://developer.apple.com/forums/thread/738042

EDIT: Indeed, adding

        self.clipsToBounds = YES;

to GlkWindow initWithFrame seems to fix it.

@TobyLobster
Copy link
Owner

Nice find.

angstsmurf added a commit to angstsmurf/CocoaGlk that referenced this issue Oct 20, 2023
macOS Sonoma no longer sets the clipsToBounds property on NSView to
true by default, which causes display glitches.

See: TobyLobster/Inform#43
@angstsmurf
Copy link
Contributor Author

angstsmurf commented Oct 20, 2023

I created a pull request upstream: MaddTheSane/CocoaGlk#1

EDIT: And it was merged.

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

2 participants