-
Notifications
You must be signed in to change notification settings - Fork 245
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
[dialog][v2][linux] Any blocking dialog does not display properly when running on Linux #956
Comments
I'm currently experiencing something at least related to this, all dialogs are causing the program to hang. #[tauri::command]
fn select_file(window: Window) {
window
.dialog()
.file()
.pick_file(|_| {});
} |
I've found a workaround for the time being. Add this to your [dependencies]
rfd = { version = "0.14.0", default-features = false, features = ["gtk3"] } And instead of using Tauri's dialog code you can use rfd's async fn select_file(window: Window) -> Option<String> {
let file = AsyncFileDialog::new()
.set_parent(&window)
.pick_file()
.await;
Some(file?.path().to_str()?.to_string())
} |
still experiencing this issue on linux from a fresh project using
|
I'm encountering the same issue on a fresh install of Arch Linux using either i3 or Sway (thus, both Xorg and Wayland environments). The problem persists when I switch to GNOME on Wayland. Every dialog interaction causes the application to freeze. I'm using a project created with the native setup and the JavaScript API as follows: import Greet from './lib/Greet.svelte';
import { open } from '@tauri-apps/plugin-dialog';
const openDialog = async () => {
// Open a dialog
const file = await open({
multiple: false,
directory: false,
});
console.log(file);
} Additionally, I have experimented with different versions of tauri-plugin-dialog, ranging from 2.0.0-alpha.0 to 2.0.0-beta.1, and tried various versions of the rfd plugin (from 0.11.0 to 0.14.0) without any success. I noticed there is an issue on the rfd project, but I'm not sure if it's related. edit: I forgot the tauri info
|
As mentioned by another in the rfd issue, it's likely unrelated as tauri doesn't use the xdg backend. |
description
The code example below is from the Rust side, but it hangs the same way from the frontend because the blocking dialog is invoked via Command. However, this seems to be a problem that
invoke_with_priority
may not be able to aquireMainContext
, so it may work in some cases.Note: I think tauri v1 also has the same problem.
plugins-workspace/plugins/dialog/src/desktop.rs
Lines 61 to 69 in 531123c
What I did
The text was updated successfully, but these errors were encountered: