Skip to content

Adopt winit 0.31 drag-and-drop (positions, Wayland) when eframe moves to it #78

Open

Description

@samitbasu

Outside file drops (#33, #71) need winit 0.31's drag-and-drop:

bullseye uses winit 0.30.13 through eframe. 0.30 delivers file drops only on X11, with no position during the drag. On the user's Fedora/Wayland desktop, the spike's gallery got no file drag events at all.

Plan

  • Watch eframe/egui moving to winit 0.31 (reportedly a draft, Winit 0.31 draft emilk/egui#7731; unverified).
  • When eframe moves, migrate bullseye first (CLAUDE.md), then build outside drops on the 0.31 events. The spike's shared insertion resolver takes DragMoved positions directly.
  • Until then: in-app DnD proceeds independently. Outside drops on Linux need XWayland. A file-picker fallback (e.g. rfd through the desktop portal) is worth considering regardless, for accessibility and as an alternative to dragging.

Blocks the "drops into the app" part of #33. Related: #71 (spike), #47 (toolchain pinning).

Activity

  1. samitbasu commented on Nov 10, 2026

    @samitbasu
    OwnerAuthor

    macOS check (user, 2026-11-10): dragging a .png from Finder onto dnd_gallery shows the drag cursor. On drop, a new panel is appended at the end of the list. winit 0.30 delivers the drop on macOS but no pointer position during the hover or at the drop, so the shared insertion resolver gets no point and falls back to the end. There is no hover gap.

    Summary on winit 0.30: macOS delivers the drop without a position; Linux/Wayland delivers nothing; X11 delivers the drop without a position (per source); the web delivers no position. Positioned outside drops therefore need winit 0.31's DragMoved/DragDropped (#78) on every platform.

    Spike follow-up: the demo failed silently: the panel appended off-screen, and app.dropped is never shown. A status line and scroll-into-view are proposed.

  2. samitbasu commented on Nov 10, 2026

    @samitbasu
    OwnerAuthor

    Correction to the macOS result (user retried, 2026-11-10): the drop does insert the new panel where the cursor is released. What's missing is the live preview while hovering: no gap follows the cursor, the panel just appears on release. The first tries appended at the end, most likely drops where no fresh pointer position had arrived yet.

    Corrected summary on winit 0.30:

    • macOS: drop delivered with a usable position at release; no position during the hover, so no live gap.
    • Linux/Wayland: nothing delivered.
    • X11: drop delivered (per source); hover position unverified.
    • Web: no position.

    #78 (winit 0.31 DragMoved) is what adds the live preview everywhere, and Wayland support.

  3. added
    post-0.1
    on Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    post-0.1

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions