Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On macOS, add documentEdited APIs #2550

Merged
merged 5 commits into from
Nov 23, 2022

Conversation

amrbashir
Copy link
Contributor

@amrbashir amrbashir commented Nov 7, 2022

  • Tested on all platforms changed
  • Added an entry to CHANGELOG.md if knowledge of this change could be valuable to users
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior
  • Created or updated an example program if it would help users understand this functionality
  • Updated feature matrix, if new features were added or implemented

Port of tauri-apps/tao@33fdeab

@kchibisov
Copy link
Member

How does it work? Is it basically enable/disable prompt and there's no event attached to it that says that user is trying to close the window with edit? Do you get CloseRequested in that case?

Is that to prevent force close by the system, since winit app can ignore CloseRequested and emulate the dialog thingy?

@kchibisov kchibisov added this to the Version 0.28 milestone Nov 20, 2022
@amrbashir
Copy link
Contributor Author

I don't use macOS but I think it is just a hint to the user that this window has unsaved changes, see this image
image

Copy link
Member

@madsmtm madsmtm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested it, it has no effect on CloseRequested, is simply a visual indication (though that would be nice to document!). It looks as follows on macOS 10.14.6:

Normal:
unedited

Edited:
edited

src/platform/macos.rs Outdated Show resolved Hide resolved
src/platform/macos.rs Show resolved Hide resolved
Copy link
Member

@madsmtm madsmtm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, will merge in a few hours once CI catches up

@madsmtm madsmtm merged commit f77f858 into rust-windowing:master Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants