Skip to content

Commit

Permalink
Update cocoa.py to match GTK behavior in PR r0x0r#1180
Browse files Browse the repository at this point in the history
  • Loading branch information
p4bl0- committed Jul 23, 2023
1 parent ff82d84 commit fa9be4c
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions webview/platforms/cocoa.py
Original file line number Diff line number Diff line change
Expand Up @@ -911,14 +911,12 @@ def should_close(window):
cancel = window.localization['global.cancel']
msg = window.localization['global.quitConfirmation']

if not window.confirm_close or BrowserView.display_confirmation_dialog(quit, cancel, msg):
should_cancel = window.events.closing.set()
if should_cancel:
return Foundation.NO
else:
return Foundation.YES
else:
should_cancel = window.events.closing.set()
if should_cancel:
return Foundation.NO
if not window.confirm_close or BrowserView.display_confirmation_dialog(quit, cancel, msg):
return Foundation.YES
return Foundation.NO

@staticmethod
def print_webview(webview):
Expand Down

0 comments on commit fa9be4c

Please sign in to comment.