|
|
@ -1067,10 +1067,20 @@ static void ImGui_ImplWin32_ShowWindow(ImGuiViewport* viewport) |
|
|
|
{ |
|
|
|
{ |
|
|
|
ImGui_ImplWin32_ViewportData* vd = (ImGui_ImplWin32_ViewportData*)viewport->PlatformUserData; |
|
|
|
ImGui_ImplWin32_ViewportData* vd = (ImGui_ImplWin32_ViewportData*)viewport->PlatformUserData; |
|
|
|
IM_ASSERT(vd->Hwnd != 0); |
|
|
|
IM_ASSERT(vd->Hwnd != 0); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ShowParent() also brings parent to front, which is not always desirable,
|
|
|
|
|
|
|
|
// so we temporarily disable parenting. (#7354)
|
|
|
|
|
|
|
|
if (vd->HwndParent != NULL) |
|
|
|
|
|
|
|
::SetWindowLongPtr(vd->Hwnd, GWLP_HWNDPARENT, (LONG_PTR)nullptr); |
|
|
|
|
|
|
|
|
|
|
|
if (viewport->Flags & ImGuiViewportFlags_NoFocusOnAppearing) |
|
|
|
if (viewport->Flags & ImGuiViewportFlags_NoFocusOnAppearing) |
|
|
|
::ShowWindow(vd->Hwnd, SW_SHOWNA); |
|
|
|
::ShowWindow(vd->Hwnd, SW_SHOWNA); |
|
|
|
else |
|
|
|
else |
|
|
|
::ShowWindow(vd->Hwnd, SW_SHOW); |
|
|
|
::ShowWindow(vd->Hwnd, SW_SHOW); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Restore
|
|
|
|
|
|
|
|
if (vd->HwndParent != NULL) |
|
|
|
|
|
|
|
::SetWindowLongPtr(vd->Hwnd, GWLP_HWNDPARENT, (LONG_PTR)vd->HwndParent); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static void ImGui_ImplWin32_UpdateWindow(ImGuiViewport* viewport) |
|
|
|
static void ImGui_ImplWin32_UpdateWindow(ImGuiViewport* viewport) |
|
|
|