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

[feat] Support macOS isDocumentEdited #268

Closed
tauri-apps bot opened this issue Dec 31, 2021 · 1 comment · Fixed by #287 or #562 · May be fixed by grant0417/tao#1
Closed

[feat] Support macOS isDocumentEdited #268

tauri-apps bot opened this issue Dec 31, 2021 · 1 comment · Fixed by #287 or #562 · May be fixed by grant0417/tao#1

Comments

@tauri-apps
Copy link

tauri-apps bot commented Dec 31, 2021

This issue has been upstreamed from tauri-apps/tauri#3125

Describe the problem

macOS has an indicator for unsaved documents. Would be nice for Tauri to support it

When isDocumentEdited is true, it shows a dot indicator like this:
Screenshot 2021-12-29 at 12 39 57 AM

Describe the solution you'd like

win.set_is_document_edited(bool)
win.is_document_edited() -> bool

Alternatives considered

No response

Additional context

isDocumentEdited: https://developer.apple.com/documentation/appkit/nswindow/1419311-isdocumentedited

joshchngs added a commit to joshchngs/tao that referenced this issue Jan 17, 2022
This fixes tauri-apps#268 and therefore tauri-apps/tauri#3125

The setter API is added upstream in the cocoa crate
(servo/core-foundation-rs PR tauri-apps#493)
joshchngs added a commit to joshchngs/tao that referenced this issue Jan 17, 2022
This fixes tauri-apps#268 and therefore tauri-apps/tauri#3125

The setter API is added upstream in the cocoa crate
(servo/core-foundation-rs PR tauri-apps#493)
@joshchngs
Copy link
Contributor

isDocumentEdited.Test.mov

joshchngs added a commit to joshchngs/tao that referenced this issue Jan 18, 2022
This fixes tauri-apps#268 and therefore tauri-apps/tauri#3125

The setter API is added upstream in the cocoa crate
(servo/core-foundation-rs PR tauri-apps#493)
amrbashir pushed a commit that referenced this issue Oct 3, 2022
* Add API for MacOS NSWindow::isDocumentEdited()

This fixes #268 and therefore tauri-apps/tauri#3125

The setter API is added upstream in the cocoa crate
(servo/core-foundation-rs PR #493)

* use objc directly

* fmt

* cast to i8

* Update src/platform/macos.rs
This was referenced Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment