From ba9ecb6095e55507cbd7fc7b5dae488a86b18bfc Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Mon, 1 Feb 2021 15:29:06 +1100 Subject: [PATCH] fix(windows): Ensure UAC window comes to foreground Fixes #3936. This is a trial change as I am not able to reproduce the problem on my machine, probably due to timing. @makarasok, can you please test if this resolves the UAC window not coming to foreground on your test scenario for #3936? --- windows/src/desktop/kmshell/install/UfrmInstallKeyboard.pas | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/windows/src/desktop/kmshell/install/UfrmInstallKeyboard.pas b/windows/src/desktop/kmshell/install/UfrmInstallKeyboard.pas index 40387a44e2..95cdac9962 100644 --- a/windows/src/desktop/kmshell/install/UfrmInstallKeyboard.pas +++ b/windows/src/desktop/kmshell/install/UfrmInstallKeyboard.pas @@ -302,7 +302,7 @@ begin Manager.UpdateProgress('Installing Keyboard', 0, 0); t := TTempFileManager.Get('.log'); try - if WaitForElevatedConfiguration(Handle, '-log "'+t.Name+'" -s -i "'+FInstallFile+'='+BCP47Tag+'" -nowelcome') = 0 then + if WaitForElevatedConfiguration(GetForegroundWindow, '-log "'+t.Name+'" -s -i "'+FInstallFile+'='+BCP47Tag+'" -nowelcome') = 0 then begin // install the keyboard tip if not InstallTipForKeyboard(BCP47Tag) then