WIP: macos: Always run TIS.. and NS.. functions on main thread #414
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some functions can only be called from the main thread. If they are called from another thread, it can lead to panics. This likely is the cause for Tauri crashing with enigo. There are functions available to send functions to the main thread that then get executed there. We should use those so enigo can be used from other threads too
In order to find out which functions have to get executed on the main thread, we can run the examples with (source):
Fixes #153
Fixes tauri-apps/tauri#6421
Fixes #352
Might fix #340