-
-
Notifications
You must be signed in to change notification settings - Fork 197
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
Changed to activate before opening window on macos. #445
base: dev
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your PR. Please check my review.
src/platform_impl/macos/app_state.rs
Outdated
// In catalina, if we set the activation policy before the app is launched, | ||
// We get a bug where the menu is not clickable. | ||
// We have solved this problem by setting the activation policy to prohibited | ||
// with `set_policy_to_prohibited` and then running `apply_activation_policy` again. | ||
set_policy_to_prohibited(); | ||
apply_activation_policy(app_delegate); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@amrbashir @keiya01
I checked the operation in catalina and the menu bar was not clickable in the previous commit.
It is not a fundamental solution, but once I set the activation policy to prohibit and then run apply_activation_policy again, I can click on the menu bar.
output.compress-video-online.com.mp4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will leave this for @wusyong to approve. He is the macOS expert.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I totally forgot this issue :(
I'm on Ventura now and this PR couldn't solve it.
Tested with winit and it also has this issue.
If anyone knows what's the latest way to fix it, please let us know.
What kind of change does this PR introduce?
Does this PR introduce a breaking change?
Checklist
fix: remove a typo, closes #___, #___
)Other information
fix tauri-apps/tauri#4310
Fixed a bug that when starting tao with cargo run on macos, it was activated after the window was opened.
before fixed
1.mov
after fixed
2022-06-23.14.22.41.1.mov