mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
macos: Add method that denotes secure restorable state
Fix process injection vulnerability on macOS.
This commit is contained in:
parent
14ec255812
commit
6a4b238641
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user