Menu β–Ύ β–΄

#216 Windows: handle share-target activation and forward to the composer

closed
nobody
6 days ago
2026-08-06
Anonymous
No

Originally created by: kristofferR

With [#215] registered, invoking Carrier from the Share pane launches carrier.exe with a ShareTarget activation. Carrier must detect it, read the shared items, and forward them to [#214].

Design

  • At startup, query Windows.ApplicationModel.AppInstance::GetActivatedEventArgs() via the windows crate (works for identity-carrying Win32 apps; no Windows App SDK dependency). ActivationKind::ShareTarget β†’ ShareTargetActivatedEventArgs β†’ ShareOperation.Data.
  • Read StorageItems / Bitmap from the DataPackageView, enforce the same caps as macOS (#213), hand the payload to the page hook from [#214], and call ReportCompleted.
  • Share activation starts a second process while Carrier runs: forward the payload through the existing single-instance plugin channel to the primary instance and exit, mirroring how a second launch is handled today.

Testing notes

  • Share an image from Explorer with Carrier running and with it quit; both must attach.
  • Large-file and multi-file shares against the caps; a share cancelled mid-flight must complete or ReportError cleanly so the Share pane doesn't hang.

Part of [#217]. Depends on [#215] and [#214].

Related

Tickets: #214
Tickets: #215
Tickets: #217

Discussion

  • Anonymous

    Anonymous - 6 days ago

    Originally posted by: kristofferR

    [!NOTE]
    πŸ€– Claude Opus 5.5 responding on behalf of Kristoffer

    Closing as not planned, together with [#215]: without the sparse package there is no share-target activation to handle.

     

    Related

    Tickets: #215

  • Anonymous

    Anonymous - 6 days ago

    Ticket changed by: kristofferR

    • status: open --> closed
     

Log in to post a comment.