Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions MatrixView.m
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,21 @@ - (instancetype)initWithFrame:(NSRect)frame isPreview:(BOOL)previewmode
saverParams.framesPerLivingCellChange = 3;
saverParams.minDepth = CLIP_NEAR;
saverParams.spawnChance = 0.2;

// Work around the API contract breakage introduced by Apple in macOS Sonoma
// https://www.jwz.org/blog/2023/10/xscreensaver-6-08-out-now/
if (@available(macOS 14, *)) {
if (!isPreview) {
[[NSDistributedNotificationCenter defaultCenter]
addObserverForName: @"com.apple.screensaver.willstop"
object: nil
queue: nil
usingBlock:^(NSNotification *n) {
[[NSApplication sharedApplication] terminate: self];
}];
}
}

return self;
}

Expand Down