MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / postFocus_

Method postFocus_

source/MRViewer/ImGuiMenu.cpp:573–600  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

571}
572
573void 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
602void ImGuiMenu::rescaleStyle_()
603{

Callers

nothing calls this directly

Calls 5

isMultiViewportEnabledFunction · 0.85
push_backMethod · 0.80
findFunction · 0.50
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected