TobyLobster / Inform

Inform is a design system for interactive fiction based on natural language
Other
82 stars 18 forks source link

Weird game display in Sonoma builds #43

Open angstsmurf opened 12 months ago

angstsmurf commented 12 months ago

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 commented 11 months ago

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 commented 11 months ago

Nice find.

angstsmurf commented 11 months ago

I created a pull request upstream: https://github.com/MaddTheSane/CocoaGlk/pull/1

EDIT: And it was merged.