diff --git a/src/xenia/ui/window.cc b/src/xenia/ui/window.cc index 306faec9a..c039cec0a 100644 --- a/src/xenia/ui/window.cc +++ b/src/xenia/ui/window.cc @@ -199,7 +199,6 @@ void Window::OnPaint(UIEvent* e) { } io.DisplaySize = ImVec2(static_cast(scaled_width()), static_cast(scaled_height())); - ImGui::NewFrame(); context_->BeginSwap(); if (context_->WasLost()) { @@ -207,6 +206,8 @@ void Window::OnPaint(UIEvent* e) { return; } + ImGui::NewFrame(); + ForEachListener([e](auto listener) { listener->OnPainting(e); }); on_painting(e); ForEachListener([e](auto listener) { listener->OnPaint(e); });