Skip to content

Drag and drop does nothing when the app runs as administrator #5

Description

@rodrifelix99

Reported by the same user as the mods-folder permission issue: with the
app running as administrator, dragging files onto the window does
nothing at all.

This is Windows UIPI. Explorer runs at medium integrity, an elevated app
runs at high, and the shell will not hand a drag from the lower process
to the higher one. desktop_drop calls RegisterDragDrop and never sees
the drop, so the app has no idea anything happened.

The fix is the documented one: call ChangeWindowMessageFilterEx for
WM_DROPFILES, WM_COPYDATA and WM_COPYGLOBALDATA (0x0049) on the
window that owns the drop target. That is the top-level runner window
plus the Flutter view's child HWND, both reachable from
FlutterWindow::OnCreate.

Costs nothing when the app is not elevated, so it can be unconditional.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions