DioxusLabs / DioxusLabs/dioxus

Dropping files doesn't work on Wayland

Open
#3,100 0 comments 0 reactions 0 assignees View on GitHub
bug desktop
Dominant language
Rust
Stars
39.1k
Forks
1.9k
Avg merge
4d 10h
Merged PRs (30d)
4

Description

**Problem**

When using a Wayland-based WM/DE (Hyprland, GNOME 3,…), dropping files (`ondrop`) always return an empty list of files.
The same machine, when using an X-based desktop environment (Cinnamon,…), doesn't have this issue.

**Steps To Reproduce**

Steps to reproduce the behavior:

- Use any Wayland-based WM or DE
- `cargo r --example file_upload`
- Click on `Choose Files` and select a file: it works
- Click on `Clear Files`
- Drag and drop the same file on the drop area: it does not work

**Expected behavior**

Dragging and dropping a file in the drop area should have the same effect as selecting it using the `Choose Files` button.

**Environment:**
- Dioxus version: v0.5.6
- Rust version: stable (v1.82.0)
- OS info: ArchLinux with Hyprland // Ubuntu 24.04.1 with GNOME 3
- App platform: `desktop`

**Notes**

I noticed the idea to switch from tao to winit #2706

However, winit seems to have the same issue:
rust-windowing/winit#720
rust-windowing/winit#1881

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.