Skip to content

Conversation

@brandonros
Copy link

No description provided.

@brandonros
Copy link
Author

@olback any reason why this isn't working? also not sure how to update the title (if we do get this call working) after we call .display because it seems to block the whole thread with no way to issue a callback/event?

@Leksat
Copy link

Leksat commented Sep 4, 2022

@brandonros I have found a way to make it work: Leksat@980f0d2
Basically, we need to update the title on the status bar, not on the menu nor on the menu item.

@Leksat
Copy link

Leksat commented Sep 4, 2022

after we call .display because it seems to block the whole thread

In my fork, the .display is not blocking. Yet I'm struggling to change the menu label from a Tauri event listener. Getting error[E0277]: `*mut objc::runtime::Object` cannot be sent between threads safely. My Rust knowledge is very very limited to solve this puzzle 😬

@Leksat
Copy link

Leksat commented Sep 12, 2022

error[E0277]: *mut objc::runtime::Object cannot be sent between threads safely

I solved this by

  • adding unsafe impl Send for TrayItem {} to my tray-item-rs fork (commit)
  • using UnsafeCell to pass the TrayItem variable to a Tauri event handler (code)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants