mirror of
https://github.com/veracrypt/VeraCrypt
synced 2024-09-21 05:16:24 +02:00
Windows: Don't use the foreground setting code if the window is already foreground
This commit is contained in:
parent
ece26c7481
commit
1e204da223
@ -6954,6 +6954,8 @@ void BringToForeground(HWND hWnd)
|
||||
DWORD dwThisTID = ::GetCurrentThreadId(),
|
||||
dwCurrTID = ::GetWindowThreadProcessId(hCurrWnd,0);
|
||||
|
||||
if (hCurrWnd != hWnd)
|
||||
{
|
||||
if(dwThisTID != dwCurrTID)
|
||||
{
|
||||
::AttachThreadInput(dwThisTID, dwCurrTID, TRUE);
|
||||
@ -6971,6 +6973,7 @@ void BringToForeground(HWND hWnd)
|
||||
::SystemParametersInfo(SPI_SETFOREGROUNDLOCKTIMEOUT,0,(PVOID)lockTimeOut,SPIF_SENDWININICHANGE | SPIF_UPDATEINIFILE);
|
||||
::AttachThreadInput(dwThisTID, dwCurrTID, FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef TCMOUNT
|
||||
if (hWnd == MainDlg)
|
||||
|
Loading…
Reference in New Issue
Block a user