macos: Add method that denotes secure restorable state

Fix process injection vulnerability on macOS.
This commit is contained in:
Arjan Molenaar 2023-11-28 22:32:28 +01:00
parent 14ec255812
commit 6a4b238641

View File

@ -57,14 +57,12 @@ typedef struct
G_DEFINE_TYPE (GtkApplicationImplQuartz, gtk_application_impl_quartz, GTK_TYPE_APPLICATION_IMPL)
@interface GtkApplicationQuartzDelegate : NSObject
@interface GtkApplicationQuartzDelegate : NSObject<NSApplicationDelegate>
{
GtkApplicationImplQuartz *quartz;
}
- (id)initWithImpl:(GtkApplicationImplQuartz*)impl;
- (NSApplicationTerminateReply) applicationShouldTerminate:(NSApplication *)sender;
- (void)application:(NSApplication *)theApplication openFiles:(NSArray *)filenames;
@end
@implementation GtkApplicationQuartzDelegate
@ -114,6 +112,11 @@ G_DEFINE_TYPE (GtkApplicationImplQuartz, gtk_application_impl_quartz, GTK_TYPE_A
[theApplication replyToOpenOrPrint:NSApplicationDelegateReplySuccess];
}
- (BOOL)applicationSupportsSecureRestorableState:(NSApplication *)app
{
return YES;
}
@end
/* these exist only for accel handling */