ocornut / imgui

Dear ImGui: Bloat-free Graphical User interface for C++ with minimal dependencies
MIT License
61.35k stars 10.33k forks source link

Dealing with the glfw window #7529

Closed gkolll closed 7 months ago

gkolll commented 7 months ago

Version/Branch of Dear ImGui:

Version 1.9.0, Branch: Docking

Back-ends:

imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp

Compiler, OS:

Windows 10 + Mingw64

Full config/build information:

No response

Details:

My Issue/Question: The DearImGui window is not dockable to the "main" glfw window (GLFWwindow* window = glfwcreateWindow(....)). It is standing out from rest of the window (not in a good way). And it is appearing as seperate window (of the same app) in the task bar.

Is there any way to dock the DearImGui windows to it? Or is it just removed somehow? Cause I haven't seen any screenshots where it is visible.

Screenshots/Video:

image

Minimal, Complete and Verifiable Example code:

// Here's some code anyone can copy and paste to reproduce your issue
ImGui::Begin("Example Bug");
MoreCodeToExplainMyIssue();
ImGui::End();
PathogenDavid commented 7 months ago

Is there any way to dock the DearImGui windows to it?

Use DockSpaceOverViewport. You can try it in the demo under Examples > Dockspace.

Or is it just removed somehow?

Removing the main viewport isn't currently supported. See https://github.com/ocornut/imgui/issues/3680

ocornut commented 7 months ago

There are also configuration flags to configure if you want secondary viewports to appear in the taskbar.

gkolll commented 7 months ago

Use DockSpaceOverViewport. You can try it in the demo under Examples > Dockspace.

thank you, got it. image

gkolll commented 7 months ago

There are also configuration flags to configure if you want secondary viewports to appear in the taskbar.

Good to know. I'll keep that in mind for future.