File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
Expand file tree Collapse file tree 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() {
100100}
101101
102102/* ---------------------------- Cocoa classes ---------------------------- */
103+ @interface MatplotlibAppDelegate : NSObject <NSApplicationDelegate >
104+ - (BOOL )applicationSupportsSecureRestorableState : (NSApplication *)app ;
105+ @end
103106
104107@interface Window : NSWindow
105108{ PyObject* manager;
@@ -195,6 +198,7 @@ static void lazy_init(void) {
195198
196199 NSApp = [NSApplication sharedApplication ];
197200 [NSApp setActivationPolicy: NSApplicationActivationPolicyRegular];
201+ [NSApp setDelegate: [[[MatplotlibAppDelegate alloc ] init ] autorelease ]];
198202
199203 // Run our own event loop while waiting for stdin on the Python side
200204 // this is needed to keep the application responsive while waiting for input
@@ -779,6 +783,12 @@ int mpl_check_modifier(
779783 },
780784};
781785
786+ @implementation MatplotlibAppDelegate
787+ - (BOOL )applicationSupportsSecureRestorableState : (NSApplication *)app {
788+ return YES ;
789+ }
790+ @end
791+
782792@interface NavigationToolbar2Handler : NSObject
783793{ PyObject* toolbar;
784794 NSButton * panbutton;
You can’t perform that action at this time.
0 commit comments