Skip to content

FR-27: file drop is missing on the Kotlin/Native Linux renderer (and Windows K/N) #72

Closed

Description

@b-re-w

Rescued from a deleted agent worktree. Partly landed.

What is missing

FR-27 (file drag and drop, Draft) covers the three desktops. On origin/develop (f64d949) it works on:

  • the JVM / native-image desktop renderer: renderer/desktop/src/renderer/HostFileDrop.kt (Compose dragAndDropTarget, installed by installFileDrop() in Renderer.kt), tests in renderer/desktop/test/FileDropTest.kt;
  • the Kotlin/Native macOS renderer: renderer/macos/src/MacosFileDrop.kt, MacosWindow.kt draggingEntered / performDragOperation;
  • the Host: FileDropTarget, on_files_entered, on_files_dropped in adapters/dioxus, EventPayload::FilesEntered/FilesDropped.

It does not work on the Kotlin/Native Linux renderer (renderer/linux/): there is no XDND handling in LinuxWindow.kt / LinuxInput.kt, platformFileDrop is never installed there, and nothing under renderer/linux mentions drop. The Kotlin/Native Windows renderer on origin/feature/windows-kotlin-native (renderer/windows/) has no DragAcceptFiles / WM_DROPFILES / IDropTarget either. With D17 / #22 making the Kotlin/Native renderers the shipped default, a Linux (and later Windows) application loses file drop.

To be done:

  1. XDND on the Linux X11 window: XdndAware, XdndEnter/XdndPosition/XdndDrop, text/uri-list decoding, hit-testing the FileDropTarget under the pointer, FilesEntered and one FilesDropped carrying every path.
  2. The same for the Windows Kotlin/Native window when that branch lands (or record it on Windows Kotlin/Native renderer (D18): merged (#119, #174), distribution in progress #24).
  3. Linux tests for the FR-27 criteria: two files arrive as one event, a node without the handlers is not a target, a path that is not valid UTF-8 is dropped and the rest arrive without aborting.
  4. Then FR-27 can move from Draft once the three desktops are verified.

Evidence

.scratch/leftover-patches/72/dnd-glass.patch (from .scratch/agent-runs-leftovers/dnd-glass.patch). That patch implemented FR-27 on the AWT desktop renderer with a modifier-based design:

  • desktop/src/DesktopFileDrop.kt (AWT DropTarget listener, validDropPaths), desktop/src/renderer/FileDropTargets.kt (FileDropRegistry, Modifier.hostFileDropTarget), empty Android/iOS/web stubs;
  • protocol: EVENT_FILES_ENTERED = 21, EVENT_FILES_DROPPED = 22, paths as a list in the string arena;
  • tests fr27_two_paths_are_encoded_in_one_drop_event, fr27_a_node_without_the_matching_subscription_is_not_a_target, fr27_a_non_utf8_path_is_discarded_without_losing_the_rest, fr27_two_file_paths_share_one_event_and_the_string_arena.

develop reimplemented this with a FileDropTarget widget and a joined path string, so the patch is not to be applied; it is kept as the reference for the criteria and the non-UTF-8 handling. The "glass" half of that worktree (FR-29 window-behind material) landed (renderer/macos/test/WindowBackdropTest.kt).

Original prompt

No prompt in .scratch/agent-runs-leftovers/prompts/ matches this patch (none mention file drop or FR-27). FR-27 itself comes from 746fa04 "Withdraw the exclusions nobody asked for, as requirements (FR-23 to FR-29)".

Due

Suggested due date: 2026-10-13

Activity

  1. b-re-w commented on Oct 24, 2026

    @b-re-w
    MemberAuthor

    구현 시작: claude-sub 세션 (pane w1:pH)

  2. b-re-w commented on Oct 24, 2026

    @b-re-w
    MemberAuthor

    Fork PR: thisisthepy/compose-multiplatform-core-extended#157 (fork PRs 110 and 114 are already merged: Linux XDND on both paths; this adds the Windows K/N path delivery)

  3. b-re-w commented on Oct 25, 2026

    @b-re-w
    MemberAuthor

    Ember need (session composer, file attachment): file drop on every desktop renderer. Ember keeps this as the owner of the Linux and Windows K/N gap. Priority P2 in the Ember gap list, size M. No new issue opened.

  4. added 2 commits that reference this issue on Nov 12, 2026
  5. b-re-w commented on Nov 13, 2026

    @b-re-w
    MemberAuthor

    Done by #615: the Windows Kotlin/Native renderer routes the fork's IDropTarget file drops to the node under them (fr27_windows_window_file_events_reach_the_target_under_them). macOS, Linux and JVM already had it. Verified: native renderer run 43345202790 and Kotlin/Native desktop run 43328500477 on feat/p1T-ci-batch2.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions