[Patch] Blame: Fix incorrect parent windows for the progress dialog

23 views
Skip to first unread message

Denis Kovalchuk

unread,
Dec 15, 2025, 4:59:12 AM12/15/25
to TortoiseSVN-dev
Hi!

I've noticed that the parent window for the "CProgressDlg" [1] may be set
incorrectly when using the Blame command.

The "Blame" [2] class is used in the following cases:
1. The "Blame..." command in the Windows Explorer context menu.
2. The "Blame..." command in the "Log Messages" dialog context menu.
3. The "Blame..." command in the "Repository Browser" dialog context menu.

In all these cases, the "Blame" class uses GetExplorerHwnd() [3] as the parent
window for the progress dialog. This is incorrect for cases 2 and 3, because
the parent windows are the dialogs.

For comparison, the "Show changes" command behaves correctly:
1. It uses GetExplorerHwnd() [4] in the case of the Windows Explorer context
menu.
2. It uses the dialog's m_hWnd [5] in the case of the "Log Messages" context
menu.

For example, this causes some problems with disabling the parent
window, when TortoiseProc.exe is called with the /hwnd parameter.

Here is a patch in attachments.

[1] https://sourceforge.net/p/tortoisesvn/code/29768/tree/trunk/src/Utils/MiscUI/ProgressDlg.h#l30
[2] https://sourceforge.net/p/tortoisesvn/code/29768/tree/trunk/src/TortoiseProc/Blame.h#l32
[3] https://sourceforge.net/p/tortoisesvn/code/29768/tree/trunk/src/TortoiseProc/Blame.cpp#l217
[4] https://sourceforge.net/p/tortoisesvn/code/29768/tree/trunk/src/TortoiseProc/Commands/DiffCommand.cpp#l36
[5] https://sourceforge.net/p/tortoisesvn/code/29768/tree/trunk/src/TortoiseProc/LogDialog/LogDlg.cpp#l3000
fix-parent-windows-for-blame-progress-dialog-v1.patch.txt

Stefan

unread,
Dec 17, 2025, 1:59:53 PM12/17/25
to TortoiseSVN-dev
thanks for the patch!
committed in r29769

Stefan
Reply all
Reply to author
Forward
0 new messages