Skip to content

Parent native file dialogs to the requesting window#1719

Merged
BryonLewis merged 1 commit into
mainfrom
fix/file-dialog-parent-window
Jun 25, 2026
Merged

Parent native file dialogs to the requesting window#1719
BryonLewis merged 1 commit into
mainfrom
fix/file-dialog-parent-window

Conversation

@mattdawkins

Copy link
Copy Markdown
Member

Native open/save dialogs were invoked without a parent BrowserWindow, so on Linux the file/folder picker could open behind the DIVE window instead of in front of it.

  • Derive the window from the IPC sender (BrowserWindow.fromWebContents(event.sender)) and pass it to dialog.showOpenDialog/showSaveDialog.
  • Falls back to the unparented call if no window is found.

Result: the picker is parented and modal to DIVE.

showOpenDialog/showSaveDialog were called without a parent BrowserWindow,
so on Linux the native file/folder browser could open behind the DIVE
window instead of in front of it. Derive the window from the IPC sender
and pass it through so the dialog is parented and modal.
@BryonLewis BryonLewis merged commit f60dd56 into main Jun 25, 2026
3 checks passed
@BryonLewis BryonLewis deleted the fix/file-dialog-parent-window branch June 25, 2026 12:44
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.

2 participants