Open maxomous opened 2 years ago
Cannot be answered without a repro.
What would you need from me?
A minimum, complete, reproducible, verifiable piece code that reproduce the issue, as requested in guidelines. Otherwise we are missing information.
Okay will get back to you :)
Okay so I stripped down my code to this:
ImGui::SetNextWindowSize(ImVec2(0, 0), ImGuiCond_Always);
if (!ImGui::Begin("Jog Controller", NULL, ImGuiWindowFlags_None)) {
ImGui::End();
return;
}
ImGui::End();
ImGui::SetNextWindowSize(ImVec2(0, 0), ImGuiCond_Always);
if (!ImGui::Begin("Overrides", NULL, ImGuiWindowFlags_None)) {
ImGui::End();
return;
}
ImGui::End();
And the error was reproducible. It seems that when both windows use the flag ImGuiCond_Always, the windows vanish. If one or both of these are changed to ImGuiCond_Appearing, it fixes the issue.
...
As a side question, since building the program from scratch and using the latest opengl3/glfw implementation files, I receive the following error when running the program: "Glfw Error 65543: GLX: Failed to create context: GLXBadFBConfig"
I am able to resolve this by prefixing the run command with "MESA_GL_VERSION_OVERRIDE=4.3 ./imgui_docking"
Is there a way to prevent the need for this prefix?
Changing position or size of an individual window undocks it, and there’s probably a side effect to doing it every frame where they keep undocking or something.
The later question is more of an OpenGL driver/setup or GLFW question.
Glad that's sorted then :)
Would you suggest posting another issue on here regarding the GLFW error? It seems odd that the previous implementation files didn't require the fix..
I would suggest not calling ImGui::SetNextWindowSize(ImVec2(0, 0), ImGuiCond_Always);
on every frame. It directly contradicts with your aim to dock two windows. You may try using ImGui::SetNextWindowSize(ImVec2(0, 0), ImGuiCond_Appearing);
to only auto-size window when it appears. You also can use ImGuiWindowFlags_AlwaysAutoResize
window flag for this purpose.
Version: Dear ImGui 1.86 WIP (18510) Branch: Docking
BackendPlatformName: imgui_impl_glfw BackendRendererName: imgui_impl_opengl3
OS: Raspberry Pi
Vendor: Broadcom Renderer: V3D 4.2 Version: 2.1 Mesa 19.3.2
My Issue/Question:
When I attempt to dock certain windows together, both windows vanish instead of becoming tabs See GIF
If however, I dock these items onto the DockSpaceOverViewport() node, they seem to remain there fine See GIF
Below is the config.ini file if it helps:
A workaround would be to only allow docking to the viewport dock node instead of windows to windows, I'm not sure if that's possible?