| 4473 | } |
| 4474 | |
| 4475 | static void SetCurrentWindow(ImGuiWindow* window) |
| 4476 | { |
| 4477 | ImGuiContext& g = *GImGui; |
| 4478 | g.CurrentWindow = window; |
| 4479 | g.StackSizesInBeginForCurrentWindow = g.CurrentWindow ? &g.CurrentWindowStack.back().StackSizesInBegin : NULL; |
| 4480 | g.CurrentTable = window && window->DC.CurrentTableIdx != -1 ? g.Tables.GetByIndex(window->DC.CurrentTableIdx) : NULL; |
| 4481 | g.CurrentDpiScale = 1.0f; // FIXME-DPI: WIP this is modified in docking |
| 4482 | if (window) |
| 4483 | { |
| 4484 | bool backup_skip_items = window->SkipItems; |
| 4485 | window->SkipItems = false; |
| 4486 | if (g.IO.BackendFlags & ImGuiBackendFlags_RendererHasTextures) |
| 4487 | { |
| 4488 | ImGuiViewport* viewport = window->Viewport; |
| 4489 | g.FontRasterizerDensity = (viewport->FramebufferScale.x != 0.0f) ? viewport->FramebufferScale.x : g.IO.DisplayFramebufferScale.x; // == SetFontRasterizerDensity() |
| 4490 | } |
| 4491 | ImGui::UpdateCurrentFontSize(0.0f); |
| 4492 | window->SkipItems = backup_skip_items; |
| 4493 | ImGui::NavUpdateCurrentWindowIsScrollPushableX(); |
| 4494 | } |
| 4495 | } |
| 4496 | |
| 4497 | void ImGui::GcCompactTransientMiscBuffers() |
| 4498 | { |
no test coverage detected