diff --git a/profiler/build/unix/build.mk b/profiler/build/unix/build.mk index 1673c225..e118b6ac 100644 --- a/profiler/build/unix/build.mk +++ b/profiler/build/unix/build.mk @@ -1,6 +1,6 @@ CFLAGS += CXXFLAGS := $(CFLAGS) -std=c++17 -DEFINES += -DTRACY_FILESELECTOR -DTRACY_EXTENDED_FONT +DEFINES += -DTRACY_FILESELECTOR -DTRACY_EXTENDED_FONT -DTRACY_ROOT_WINDOW INCLUDES := $(shell pkg-config --cflags glfw3) -I../../../imgui -I../../libs/gl3w LIBS := $(shell pkg-config --libs glfw3) -lpthread -ldl PROJECT := Tracy diff --git a/profiler/build/win32/Tracy.vcxproj b/profiler/build/win32/Tracy.vcxproj index 97544d08..c81551ec 100644 --- a/profiler/build/win32/Tracy.vcxproj +++ b/profiler/build/win32/Tracy.vcxproj @@ -48,7 +48,7 @@ Level3 Disabled true - TRACY_FILESELECTOR;TRACY_EXTENDED_FONT;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;WIN32_LEAN_AND_MEAN;NOMINMAX;_USE_MATH_DEFINES;%(PreprocessorDefinitions) + TRACY_FILESELECTOR;TRACY_EXTENDED_FONT;TRACY_ROOT_WINDOW;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;WIN32_LEAN_AND_MEAN;NOMINMAX;_USE_MATH_DEFINES;%(PreprocessorDefinitions) ..\..\libs\glfw\include;..\..\libs\gl3w;..\..\..\imgui;%(AdditionalIncludeDirectories) true false @@ -73,7 +73,7 @@ true true true - TRACY_FILESELECTOR;TRACY_EXTENDED_FONT;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;WIN32_LEAN_AND_MEAN;NOMINMAX;_USE_MATH_DEFINES;%(PreprocessorDefinitions) + TRACY_FILESELECTOR;TRACY_EXTENDED_FONT;TRACY_ROOT_WINDOW;NDEBUG;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;WIN32_LEAN_AND_MEAN;NOMINMAX;_USE_MATH_DEFINES;%(PreprocessorDefinitions) ..\..\libs\glfw\include;..\..\libs\gl3w;..\..\..\imgui;%(AdditionalIncludeDirectories) true true diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 7c32569f..3816a21d 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -521,7 +521,27 @@ bool View::DrawImpl() char tmp[2048]; sprintf( tmp, "%s###Profiler", m_worker.GetCaptureName().c_str() ); ImGui::SetNextWindowSize( ImVec2( 1550, 800 ), ImGuiCond_FirstUseEver ); + +#ifdef TRACY_ROOT_WINDOW + auto& style = ImGui::GetStyle(); + const auto wrPrev = style.WindowRounding; + const auto wbsPrev = style.WindowBorderSize; + const auto wpPrev = style.WindowPadding; + style.WindowRounding = 0.f; + style.WindowBorderSize = 0.f; + style.WindowPadding = ImVec2( 4.f, 4.f ); + + ImGui::SetNextWindowPos( ImVec2( 0, 0 ) ); + ImGui::SetNextWindowSize( ImVec2( m_rootWidth, m_rootHeight ) ); + ImGui::Begin( tmp, nullptr, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoBringToFrontOnFocus | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoMove ); + + style.WindowRounding = wrPrev; + style.WindowBorderSize = wbsPrev; + style.WindowPadding = wpPrev; +#else ImGui::Begin( tmp, keepOpenPtr, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoBringToFrontOnFocus ); +#endif + if( !m_worker.IsDataStatic() ) { if( ImGui::Button( m_pause ? MainWindowButtons[0] : MainWindowButtons[1], ImVec2( bw, 0 ) ) ) m_pause = !m_pause;