Skip to content

Show mount/wait dialog on the monitor of the main window - #1865

Open
amail80 wants to merge 1 commit into
veracrypt:masterfrom
amail80:fix/wait-dialog-monitor
Open

Show mount/wait dialog on the monitor of the main window#1865
amail80 wants to merge 1 commit into
veracrypt:masterfrom
amail80:fix/wait-dialog-monitor

Conversation

@amail80

@amail80 amail80 commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

On a multi-monitor setup the wait dialog shown while mounting or dismounting always appears on the primary monitor, even when the main window is on another one. The user is looking at the main window and the progress indication shows up on a different screen.

The dialog is created with a hidden tool window as its parent rather than with the main window, so the usual centering on the owner does not apply. This reads the creator window's rectangle with GetWindowRect and centers the dialog on the monitor that rectangle belongs to, falling back to the previous behaviour when there is no creator window.

Tested on Windows 11 with two monitors at different scale factors, with the main window on the secondary display: the wait dialog now appears next to it instead of on the primary monitor.

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