Viewport: Added Platform_UpdateWindow hook for general purpose: Rework Win32 code to reflect viewport flags changes into Win32 while the window is active.

This commit is contained in:
omar
2019-01-02 16:06:58 +01:00
parent 5305c32242
commit 4a6f95acc8
3 changed files with 53 additions and 17 deletions

View File

@ -7794,6 +7794,10 @@ void ImGui::UpdatePlatformWindows()
g.PlatformIO.Platform_SetWindowAlpha(viewport, viewport->Alpha);
viewport->LastAlpha = viewport->Alpha;
// Optional, general purpose call to allow the back-end to perform general book-keeping even if things haven't changed.
if (g.PlatformIO.Platform_UpdateWindow)
g.PlatformIO.Platform_UpdateWindow(viewport);
if (is_new_platform_window)
{
// On startup ensure new platform window don't steal focus (give it a few frames, as nested contents may lead to viewport being created a few frames late)