File tree 1 file changed +10
-0
lines changed 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,9 @@ static int wait_for_stdin() {
100
100
}
101
101
102
102
/* ---------------------------- Cocoa classes ---------------------------- */
103
+ @interface MatplotlibAppDelegate : NSObject <NSApplicationDelegate >
104
+ - (BOOL )applicationSupportsSecureRestorableState : (NSApplication *)app ;
105
+ @end
103
106
104
107
@interface Window : NSWindow
105
108
{ PyObject* manager;
@@ -195,6 +198,7 @@ static void lazy_init(void) {
195
198
196
199
NSApp = [NSApplication sharedApplication ];
197
200
[NSApp setActivationPolicy: NSApplicationActivationPolicyRegular];
201
+ [NSApp setDelegate: [[[MatplotlibAppDelegate alloc ] init ] autorelease ]];
198
202
199
203
// Run our own event loop while waiting for stdin on the Python side
200
204
// this is needed to keep the application responsive while waiting for input
@@ -779,6 +783,12 @@ int mpl_check_modifier(
779
783
},
780
784
};
781
785
786
+ @implementation MatplotlibAppDelegate
787
+ - (BOOL )applicationSupportsSecureRestorableState : (NSApplication *)app {
788
+ return YES ;
789
+ }
790
+ @end
791
+
782
792
@interface NavigationToolbar2Handler : NSObject
783
793
{ PyObject* toolbar;
784
794
NSButton * panbutton;
You can’t perform that action at this time.
0 commit comments