Viewports: added opaque void* PlatformIconData storage in viewport and ImGuiWindowClass to allow passing icon information to a custom backend or hook. (#2715)

This commit is contained in:
ocornut
2026-04-09 23:39:09 +02:00
parent bbcc83e999
commit d55608a5bb
3 changed files with 10 additions and 0 deletions

View File

@@ -17377,6 +17377,8 @@ void ImGui::WindowSyncOwnedViewport(ImGuiWindow* window, ImGuiWindow* parent_win
window->Viewport->Flags = viewport_flags;
window->Viewport->PlatformIconData = window->WindowClass.PlatformIconData;
// Update parent viewport ID
// (the !IsFallbackWindow test mimic the one done in WindowSelectViewport())
if (window->WindowClass.ParentViewportId != (ImGuiID)-1)