Try to ensure the About panel always renders the Quartz Composition

Unsure if it's related to the ARC migration, but the app may crash opening or closing the About panel in a way which implicates Quartz internals.
Explicitly retaining the About panel and QCView and being more gentle about restarting rendering seems to help.
This commit is contained in:
Andrew Kitchen 2024-06-22 16:08:17 -07:00
parent ccd5ee6cf8
commit 2b28cfd928

View file

@ -65,8 +65,8 @@ static NSInteger kKCPrefDisplayIconInDock = 0x02;
@property (nonatomic, assign) KeyCombo toggleKeyCombo;
@property (nonatomic, assign) IBOutlet NSMenu *statusMenu;
@property (nonatomic, assign) IBOutlet NSWindow *aboutWindow;
@property (nonatomic, assign) IBOutlet QCView *aboutQCView;
@property (nonatomic, strong) IBOutlet NSWindow *aboutWindow;
@property (nonatomic, strong) IBOutlet QCView *aboutQCView;
@property (nonatomic, assign) IBOutlet NSWindow *preferencesWindow;
@property (nonatomic, assign) IBOutlet KCPrefsWindowController *prefsWindowController;
@property (nonatomic, assign) IBOutlet SRRecorderControl *shortcutRecorder;
@ -330,10 +330,14 @@ static NSInteger kKCPrefDisplayIconInDock = 0x02;
-(void) orderFrontKeyCastrAboutPanel:(id)sender
{
[aboutQCView startRendering];
[aboutWindow center];
[aboutWindow makeKeyAndOrderFront:sender];
[NSApp activateIgnoringOtherApps:YES];
[aboutWindow center];
[aboutWindow makeKeyAndOrderFront:sender];
if (!aboutQCView.isRendering) {
[aboutQCView startRendering];
}
[NSApp activateIgnoringOtherApps:YES];
}
-(void) orderFrontKeyCastrPreferencesPanel:(id)sender