You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Better handling of window focus when compiling for live code.
* Console window is made visible and brought to the front when a compile is triggered. * Patched application window is brought to the front once patching is complete. #rb none #jira UE-71128 #ROBOMERGE-OWNER: ryan.gerleve #ROBOMERGE-AUTHOR: ben.marsh #ROBOMERGE-SOURCE: CL 5337696 in //UE4/Release-4.22/... via CL 5338036 #ROBOMERGE-BOT: ENGINE (Main -> Dev-Networking) [CL 5401218 by ben marsh in Dev-Networking branch]
This commit is contained in:
@@ -566,6 +566,23 @@ unsigned int __stdcall ServerCommandThread::CompileThreadProxy(void* context)
|
||||
return instance->CompileThread();
|
||||
}
|
||||
|
||||
// BEGIN EPIC MOD - Focus application windows on patch complete
|
||||
BOOL CALLBACK FocusApplicationWindows(HWND WindowHandle, LPARAM Lparam)
|
||||
{
|
||||
DWORD WindowProcessId;
|
||||
GetWindowThreadProcessId(WindowHandle, &WindowProcessId);
|
||||
|
||||
const types::vector<LiveProcess*>& Processes = *(const types::vector<LiveProcess*>*)Lparam;
|
||||
for (LiveProcess* Process : Processes)
|
||||
{
|
||||
if (Process->GetProcessId() == WindowProcessId && IsWindowVisible(WindowHandle))
|
||||
{
|
||||
SetForegroundWindow(WindowHandle);
|
||||
}
|
||||
}
|
||||
return Windows::TRUE;
|
||||
}
|
||||
// END EPIC MOD
|
||||
|
||||
void ServerCommandThread::CompileChanges(bool didAllProcessesMakeProgress)
|
||||
{
|
||||
@@ -765,6 +782,7 @@ void ServerCommandThread::CompileChanges(bool didAllProcessesMakeProgress)
|
||||
|
||||
case LiveModule::ErrorType::SUCCESS:
|
||||
GLiveCodingServer->GetCompileFinishedDelegate().ExecuteIfBound(ELiveCodingResult::Success, L"Patch creation successful.");
|
||||
EnumWindows(FocusApplicationWindows, (LPARAM)&m_liveProcesses);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user