-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Multi window freeze #2311
Comments
I can reproduce this issue on windows with your repo but can't reproduce it with our multiwindow example. |
@amrbashir I think the multiwindow example only creates windows from |
|
@amrbashir Ah, so then it calls this internal command: tauri/core/tauri/src/endpoints/window.rs Lines 115 to 128 in fd8fab5
|
yeah but we still need to figure out why it doesn't work from commands, doesn't matter which attributes you set too #[command]
pub fn new_window(app_handle: AppHandle) -> Result<(), String> {
println!("new w");
app_handle
.create_window("main2".to_string(), WindowUrl::default(), |win, webview| (win, webview))
.expect("Error creating window");
println!("- done");
Ok(())
} |
It doesn't work because the command is not async, which means it is ran on the main thread and it's preventing the event loop from receiving the message. Changing the |
Describe the bug
Creating a new window like this makes the app unresponsive on macOS:
To Reproduce
Repo: https://github.com/probablykasper/tauri-multiwindow-freeze-bug
Platform and Versions (required):
The text was updated successfully, but these errors were encountered: