File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
toolkit/crashreporter/client/app/src/ui/macos Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -279,11 +279,6 @@ objc_class! {
279
279
self . windows = windows. unwrap( ) ;
280
280
281
281
}
282
-
283
- #[ sel( applicationShouldTerminateAfterLastWindowClosed: ) ]
284
- fn application_should_terminate_after_window_closed( & mut self , _app: Ptr <cocoa:: NSApplication >) -> runtime:: BOOL {
285
- runtime:: YES
286
- }
287
282
}
288
283
}
289
284
@@ -335,10 +330,13 @@ objc_class! {
335
330
336
331
#[ sel( windowWillClose: ) ]
337
332
fn window_will_close( & mut self , _notification: Ptr <cocoa:: NSNotification >) {
338
- if self . modal {
339
- unsafe {
340
- let nsapp = cocoa :: NSApplication :: sharedApplication ( ) ;
333
+ unsafe {
334
+ let nsapp = cocoa :: NSApplication :: sharedApplication ( ) ;
335
+ if self . modal {
341
336
nsapp. stopModal( ) ;
337
+ } else if self . instance == nsapp. mainWindow( ) . 0 {
338
+ // Stop the application, causing run_loop to exit.
339
+ nsapp. stop_( self . instance) ;
342
340
}
343
341
}
344
342
}
You can’t perform that action at this time.
0 commit comments