Skip to content

feat(windows): add parentWindowHandle parameter to override window handle lookup#2079

Open
aexei wants to merge 1 commit into
miguelpruivo:masterfrom
aexei:master
Open

feat(windows): add parentWindowHandle parameter to override window handle lookup#2079
aexei wants to merge 1 commit into
miguelpruivo:masterfrom
aexei:master

Conversation

@aexei

@aexei aexei commented Jun 23, 2026

Copy link
Copy Markdown

Description:

Adds an optional int? parentWindowHandle parameter to pickFiles, pickFile, saveFile, and getDirectoryPath. When provided alongside lockParentWindow: true, the given handle is used directly as hwndOwner instead of calling FindWindowA internally.

This is useful when the app manages multiple windows or the automatic lookup returns the wrong handle.

Usage:

await FilePicker.pickFiles(
  lockParentWindow: true,
  parentWindowHandle: myHwnd, // raw HWND as int
);

If parentWindowHandle is null, behavior is unchanged — _getWindowHandle() is used as before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant