Comments (13)
Hello,
I come from Tauri v2 alpha here, and open a Dialog freeze the application. I'm using archlinux with wayland and hyprland, seems to be related to this.
With the taui v1.3 version I don't have the problem.
from rfd.
For references, here are my main.rs and Cargo.toml. I also add that everything works well when using the default feature flags with the gtk backend.
use rfd::FileDialog;
fn main() {
println!("Hello, world!");
let files = FileDialog::new()
.set_directory("/")
.pick_file();
println!("files: {:?}", files);
}
[package]
name = "test"
version = "0.1.0"
edition = "2021"
[dependencies]
rfd = { version = "0.12.1", default-features = false, features = [
"xdg-portal",
] }
from rfd.
I'm having similar issues. The main difference in my setup is I'm using xdg-desktop-portal-hyprland
as the backend instead of -gtk
.
from rfd.
I have encountered this problem in tauri with xdg-desktop-portal-hyprland
from rfd.
running cargo run --example save --no-default-features --features xdg-portal
works on both my desktop arch box running gnome and xdg-desktop-portal
1.18.2 as well as my fedora laptop running the same configuration
from rfd.
Name : xdg-desktop-portal
Version : 1.18.2
Name : xdg-desktop-portal-gtk
Version : 1.15.1
Name : xdg-desktop-portal-gnome
Version : 45.0
Works fine here.
The main difference in my setup is I'm using xdg-desktop-portal-hyprland as the backend instead of -gtk.
hyperland portal does not provide a file picker, or anything beyond screen sharing. You have to have a portal that does next to hyperland portal. (You can, and should run both)
I have encountered this problem in tauri with xdg-desktop-portal-hyprland
@LIMPIX31
Probably same as above
(PS. just don't mistake freedesktop's gtk portal for gnome portal, as the former one will most likely not work for you on hyperland)
EDIT: Yep. hyperland wiki says the same thing: https://wiki.hyprland.org/Useful-Utilities/Hyprland-desktop-portal/#installing
from rfd.
Hello,
I come from Tauri v2 alpha here, and open a Dialog freeze the application. I'm using archlinux with wayland and hyprland, seems to be related to this. With the taui v1.3 version I don't have the problem.
The same. I have tried different versions of rfd and xdg-desktop-portal but no result.
from rfd.
That's unrelated, Tauri does not use xdp backend
from rfd.
For me a workaround is to pin the rfd version to 0.12.0:
rfd = "=0.12.0"
Change this to a newer version (e.g. 0.12.1) causes this issue again.
from rfd.
How about master? We updated ashpd perhaps that helps somehow
from rfd.
With master:
rfd = { git = "https://github.com/PolyMeilex/rfd.git", branch = "master" }
I still have the same issue as with version 0.12.1 or 0.13.0
from rfd.
How about now? Either master or new 0.14
XDG Backend now has zenity fallback.
And XDG Backend is not the default, without the need to enable any features.
from rfd.
Great, for me the issue is solved with version 0.14.0.
==============
Some more information from my testing in the last days:
I my case it seems to be an issue with a combination of rfd with some other framework (in my case slint).
The following minimal code was also working with the problematic versions 0.12.1 and 0.13.0:
use std::path::PathBuf;
fn main() {
rfd();
}
fn rfd() {
let current_dir = PathBuf::from("/tmp");
println!("Current dir: {}", current_dir.display());
let new_dir: PathBuf = rfd::FileDialog::new()
.set_title("Folder selection")
.set_directory(¤t_dir)
.pick_folder()
.unwrap_or(current_dir)
.to_string_lossy()
.to_string()
.into();
println!("New dir: {}", new_dir.display());
}
But adding slint to the party with the following code, the problem was reproducible:
use std::path::PathBuf;
slint::slint!{
import { Button } from "std-widgets.slint";
export component HelloWorld {
callback rfd;
Button {
text: "rfd";
clicked => { rfd() }
}
}
}
fn main() {
let app = HelloWorld::new().unwrap();
app.on_rfd({
move || {
rfd()
}
});
app.run().unwrap();
}
fn rfd() {
let current_dir = PathBuf::from("/tmp");
println!("Current dir: {}", current_dir.display());
let new_dir: PathBuf = rfd::FileDialog::new()
.set_title("Folder selection")
.set_directory(¤t_dir)
.pick_folder()
.unwrap_or(current_dir)
.to_string_lossy()
.to_string()
.into();
println!("New dir: {}", new_dir.display());
}
from rfd.
Related Issues (20)
- Reduce or Feature gate dependencies HOT 7
- After updating to MacOS ventura scroll bar does not appear
- Major compilation time regression going from 1.71.0 to 1.72.0 with feature xdg-portal in release mode HOT 4
- GTK AsyncFileDialog seems to spinlock HOT 1
- Doesn't work in web workers
- Make async/blocking api fully optional
- [feature] filter for filename
- Tokio support
- Web implementation does not handle dark mode gracefully HOT 4
- How to actually use AsyncFileDialog in WASM? HOT 1
- Save Dialog locks up when selecting an Existing File and clicking the Save button. (Windows 10) HOT 5
- File dialog freeze when use in JNI
- New file dialog HOT 2
- rfd 0.14 has dependency conflicts for winit apps on macOS HOT 7
- TaskDialogIndirect doesn't work for some reason.
- Crash when attempting to open FileDialogue (MacOS)
- Linux message dialogues displaying "All updates are complete"
- Wasm inline style clashes with CSP headers HOT 1
- Lastest version 0.14.1 not available at crates.io HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rfd.