| 4630 | } |
| 4631 | |
| 4632 | static void SetCurrentWindow(ImGuiWindow* window) |
| 4633 | { |
| 4634 | ImGuiContext& g = *GImGui; |
| 4635 | g.CurrentWindow = window; |
| 4636 | g.StackSizesInBeginForCurrentWindow = g.CurrentWindow ? &g.CurrentWindowStack.back().StackSizesInBegin : NULL; |
| 4637 | g.CurrentTable = window && window->DC.CurrentTableIdx != -1 ? g.Tables.GetByIndex(window->DC.CurrentTableIdx) : NULL; |
| 4638 | g.CurrentDpiScale = 1.0f; // FIXME-DPI: WIP this is modified in docking |
| 4639 | if (window) |
| 4640 | { |
| 4641 | if (g.IO.BackendFlags & ImGuiBackendFlags_RendererHasTextures) |
| 4642 | { |
| 4643 | ImGuiViewport* viewport = window->Viewport; |
| 4644 | g.FontRasterizerDensity = (viewport->FramebufferScale.x != 0.0f) ? viewport->FramebufferScale.x : g.IO.DisplayFramebufferScale.x; // == SetFontRasterizerDensity() |
| 4645 | } |
| 4646 | const bool backup_skip_items = window->SkipItems; |
| 4647 | window->SkipItems = false; |
| 4648 | ImGui::UpdateCurrentFontSize(0.0f); |
| 4649 | window->SkipItems = backup_skip_items; |
| 4650 | ImGui::NavUpdateCurrentWindowIsScrollPushableX(); |
| 4651 | } |
| 4652 | } |
| 4653 | |
| 4654 | void ImGui::GcCompactTransientMiscBuffers() |
| 4655 | { |
no test coverage detected