| 571 | } |
| 572 | |
| 573 | void ImGuiMenu::postFocus_( bool focused ) |
| 574 | { |
| 575 | ImGui_ImplGlfw_WindowFocusCallback( viewer->window, focused ); |
| 576 | #ifdef _WIN32 |
| 577 | if ( focused && ImGui::isMultiViewportEnabled() ) |
| 578 | { |
| 579 | std::vector<GLFWwindow*> processedWindow; |
| 580 | for ( ImGuiWindow* win : ImGui::GetCurrentContext()->Windows ) |
| 581 | { |
| 582 | if ( !win->Viewport ) |
| 583 | continue; |
| 584 | GLFWwindow* glfwWindow = ( GLFWwindow* )win->Viewport->PlatformHandle; |
| 585 | if ( !glfwWindow || getViewerInstance().window == glfwWindow ) |
| 586 | continue; |
| 587 | |
| 588 | auto findIt = std::find( processedWindow.begin(), processedWindow.end(), glfwWindow ); |
| 589 | if ( findIt != processedWindow.end() ) |
| 590 | continue; |
| 591 | |
| 592 | processedWindow.push_back( glfwWindow ); |
| 593 | { |
| 594 | HWND hwnd = glfwGetWin32Window( glfwWindow ); |
| 595 | SetWindowPos( hwnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_NOACTIVATE ); |
| 596 | } |
| 597 | } |
| 598 | } |
| 599 | #endif |
| 600 | } |
| 601 | |
| 602 | void ImGuiMenu::rescaleStyle_() |
| 603 | { |
nothing calls this directly
no test coverage detected