diff --git a/backends/imgui_impl_win32.cpp b/backends/imgui_impl_win32.cpp index c154c8b34..12e7b00f7 100644 --- a/backends/imgui_impl_win32.cpp +++ b/backends/imgui_impl_win32.cpp @@ -1258,6 +1258,7 @@ static void ImGui_ImplWin32_ShowWindow(ImGuiViewport* viewport) ::ShowWindow(vd->Hwnd, SW_SHOW); // Restore + // FIXME: Note that setting parent also disable task bar icon, which is sort of unexpected and both params are picked separately. if (avoid_bringing_parent_to_front) ::SetWindowLongPtr(vd->Hwnd, GWLP_HWNDPARENT, (LONG_PTR)vd->HwndParent); } diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index 89b570fac..364959085 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -102,6 +102,13 @@ Other Changes: Made the script detect the environment when needed (e.g. to specify library path). - Examples: added support for ARM64 in selected build_win.bat helpers. (#9593) [@Harishmcw] +Docking+Viewports Branch: + +- Viewports: + - Fixed an issue where in some code paths, a newly created modal in its own + viewport would be created with `ImGuiViewportFlags_NoFocusOnAppearing`. + On some backends this would prevent the task bar icon from showing. + ----------------------------------------------------------------------- VERSION 1.93.0 (Released 2026-10-14) diff --git a/imgui.cpp b/imgui.cpp index 3a604ee54..217b24d66 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -17501,6 +17501,8 @@ ImGuiViewportP* ImGui::AddUpdateViewport(ImGuiWindow* window, ImGuiID id, const const bool window_can_use_inputs = ((window->Flags & ImGuiWindowFlags_NoMouseInputs) && (window->Flags & ImGuiWindowFlags_NoNavInputs)) == false; if (g.MovingWindow && g.MovingWindow->RootWindowDockTree == window) flags |= ImGuiViewportFlags_NoInputs | ImGuiViewportFlags_NoFocusOnAppearing; + else if (window->Flags & ImGuiWindowFlags_Modal) + flags &= ~ImGuiViewportFlags_NoFocusOnAppearing; if (!window_can_use_inputs) flags |= ImGuiViewportFlags_NoInputs; if (window->Flags & ImGuiWindowFlags_NoFocusOnAppearing)