Docking - Gap between windows & difference between 1.89.7 and 1.92.9 #9563

Closed
opened 2026-09-29 17:39:02 +00:00 by ypujante · 0 comments
ypujante commented 2026-09-29 17:39:02 +00:00 (Migrated from github.com)

Version/Branch of Dear ImGui:

Version 1.92.9b, Branch: docking (master/docking/etc.)

Back-ends:

imgui_impl_glfw.cpp + imgui_impl_opengl2.cpp AND example_apple_metal4

Compiler, OS:

Apple clang version 21.0.0 / Target: arm64-apple-darwin27.0.0 (macOS 27)

Full config/build information:

// I have tried with 2 different backends so I copy/pasted the from example_apple_metal4

Dear ImGui 1.92.9b (19291)
--------------------------------
sizeof(size_t): 8, sizeof(ImDrawIdx): 2, sizeof(ImDrawVert): 20
define: __cplusplus=201103
define: __APPLE__
define: __GNUC__=4
define: __clang_version__=21.0.0 (clang-2100.3.34.2)
define: IMGUI_HAS_VIEWPORT
define: IMGUI_HAS_DOCK
IM_ASSERT: runs expression: OK. expand size: OK
--------------------------------
io.BackendPlatformName: imgui_impl_osx
io.BackendRendererName: imgui_impl_metal4
io.ConfigFlags: 0x00000483
 NavEnableKeyboard
 NavEnableGamepad
 DockingEnable
 ViewportsEnable
io.ConfigViewportsNoDecoration
io.ConfigViewportsNoDefaultParent
io.ConfigMacOSXBehaviors
io.ConfigNavCaptureKeyboard
io.ConfigInputTextCursorBlink
io.ConfigWindowsResizeFromEdges
io.ConfigMemoryCompactTimer = 60.0
io.BackendFlags: 0x00000C1A
 HasMouseCursors
 PlatformHasViewports
 RendererHasVtxOffset
 RendererHasTextures
 RendererHasViewports
--------------------------------
io.Fonts: 1 fonts, Flags: 0x00000000, TexSize: 512,128
io.Fonts->FontLoaderName: stb_truetype
io.DisplaySize: 1200.00,800.00
io.DisplayFramebufferScale: 2.00,2.00
--------------------------------
style.WindowPadding: 8.00,8.00
style.WindowBorderSize: 1.00
style.FramePadding: 4.00,3.00
style.FrameRounding: 0.00
style.FrameBorderSize: 0.00
style.ItemSpacing: 8.00,4.00
style.ItemInnerSpacing: 4.00,4.00

Details:

Hi Omar

I just updated my project from 1.89.7 to the latest version 1.92.9b. I am using the Docking branch.

I am seeing a very different behavior between the 2 versions. I have read all the release notes between these 2 versions (yes I did not ask AI to do it for me... I read all of them). I did not see (or maybe I miss) something that would explain the radically different behavior.

In 1.89.7, if I dock the window to the bottom anchor, you can see it takes the whole space available, then I drag the other window to the top anchor and it gets split between the 2 and I can drag the line between the 2 to adjust both of them at the same time.

In 1.92.9b, if I dock the window to the bottom anchor, it no longer takes the whole space available but some portions at the bottom. If I drag the other window to the top anchor, then it takes some portion available at the top. And there is a gap between the 2 windows that is there permanently and cannot be shrunk. They no longer are "connected".

Am I not understanding how docking is supposed to work? Is this a bug?

Also loading the same window with a ".ini" file saved with 1.89.7 and opening it with 1.92.9b result in the individual windows not being docked anymore, but just free floating (they have a triangle at the bottom right corner to resize them in 1.92.9b). I saw in one of the release notes that the IMGUI_USE_LEGACY_CRC32_ADLER flag could have an impact but uncommenting it did not change anything.

Screenshots/Video:

ImGui 1.89.7:
https://github.com/user-attachments/assets/fddfc379-315b-47c5-8495-358ecda30678

ImGui 1.92.9b
https://github.com/user-attachments/assets/850c42f9-207b-4d6b-86d0-57841e1ff0b6

Minimal, Complete and Verifiable Example code:

I reproduced the same behavior by using example_apple_metal4 (to not have to depend on any other libraries like glfw) by simply adding the falt to enable docking and calling ImGui::DockSpaceOverViewport on every frame, like this:

-(void)drawInMTKView:(MTKView*)view
{
    ImGuiIO& io = ImGui::GetIO();
    io.DisplaySize.x = view.bounds.size.width;
    io.DisplaySize.y = view.bounds.size.height;

    // ADDED to enable docking
    io.ConfigFlags |= ImGuiConfigFlags_DockingEnable;

/// <snip>

#if TARGET_OS_OSX
    ImGui_ImplOSX_NewFrame(view);
#endif
    ImGui::NewFrame();
   
    // ADDED on every frame
    ImGui::DockSpaceOverViewport();

/// <snip>

### Version/Branch of Dear ImGui: Version 1.92.9b, Branch: docking (master/docking/etc.) ### Back-ends: imgui_impl_glfw.cpp + imgui_impl_opengl2.cpp AND example_apple_metal4 ### Compiler, OS: Apple clang version 21.0.0 / Target: arm64-apple-darwin27.0.0 (macOS 27) ### Full config/build information: // I have tried with 2 different backends so I copy/pasted the from example_apple_metal4 ```cpp Dear ImGui 1.92.9b (19291) -------------------------------- sizeof(size_t): 8, sizeof(ImDrawIdx): 2, sizeof(ImDrawVert): 20 define: __cplusplus=201103 define: __APPLE__ define: __GNUC__=4 define: __clang_version__=21.0.0 (clang-2100.3.34.2) define: IMGUI_HAS_VIEWPORT define: IMGUI_HAS_DOCK IM_ASSERT: runs expression: OK. expand size: OK -------------------------------- io.BackendPlatformName: imgui_impl_osx io.BackendRendererName: imgui_impl_metal4 io.ConfigFlags: 0x00000483 NavEnableKeyboard NavEnableGamepad DockingEnable ViewportsEnable io.ConfigViewportsNoDecoration io.ConfigViewportsNoDefaultParent io.ConfigMacOSXBehaviors io.ConfigNavCaptureKeyboard io.ConfigInputTextCursorBlink io.ConfigWindowsResizeFromEdges io.ConfigMemoryCompactTimer = 60.0 io.BackendFlags: 0x00000C1A HasMouseCursors PlatformHasViewports RendererHasVtxOffset RendererHasTextures RendererHasViewports -------------------------------- io.Fonts: 1 fonts, Flags: 0x00000000, TexSize: 512,128 io.Fonts->FontLoaderName: stb_truetype io.DisplaySize: 1200.00,800.00 io.DisplayFramebufferScale: 2.00,2.00 -------------------------------- style.WindowPadding: 8.00,8.00 style.WindowBorderSize: 1.00 style.FramePadding: 4.00,3.00 style.FrameRounding: 0.00 style.FrameBorderSize: 0.00 style.ItemSpacing: 8.00,4.00 style.ItemInnerSpacing: 4.00,4.00 ``` ### Details: Hi Omar I just updated my project from 1.89.7 to the latest version 1.92.9b. I am using the Docking branch. I am seeing a very different behavior between the 2 versions. I have read all the release notes between these 2 versions (yes I did not ask AI to do it for me... I read all of them). I did not see (or maybe I miss) something that would explain the radically different behavior. In 1.89.7, if I dock the window to the bottom anchor, you can see it takes the whole space available, then I drag the other window to the top anchor and it gets split between the 2 and I can drag the line between the 2 to adjust both of them at the same time. In 1.92.9b, if I dock the window to the bottom anchor, it no longer takes the whole space available but some portions at the bottom. If I drag the other window to the top anchor, then it takes some portion available at the top. And there is a gap between the 2 windows that is there permanently and cannot be shrunk. They no longer are "connected". Am I not understanding how docking is supposed to work? Is this a bug? Also loading the same window with a ".ini" file saved with 1.89.7 and opening it with 1.92.9b result in the individual windows not being docked anymore, but just free floating (they have a triangle at the bottom right corner to resize them in 1.92.9b). I saw in one of the release notes that the `IMGUI_USE_LEGACY_CRC32_ADLER` flag could have an impact but uncommenting it did not change anything. ### Screenshots/Video: ImGui 1.89.7: https://github.com/user-attachments/assets/fddfc379-315b-47c5-8495-358ecda30678 ImGui 1.92.9b https://github.com/user-attachments/assets/850c42f9-207b-4d6b-86d0-57841e1ff0b6 ### Minimal, Complete and Verifiable Example code: I reproduced the same behavior by using example_apple_metal4 (to not have to depend on any other libraries like glfw) by simply adding the falt to enable docking and calling `ImGui::DockSpaceOverViewport` on every frame, like this: ```cpp -(void)drawInMTKView:(MTKView*)view { ImGuiIO& io = ImGui::GetIO(); io.DisplaySize.x = view.bounds.size.width; io.DisplaySize.y = view.bounds.size.height; // ADDED to enable docking io.ConfigFlags |= ImGuiConfigFlags_DockingEnable; /// <snip> #if TARGET_OS_OSX ImGui_ImplOSX_NewFrame(view); #endif ImGui::NewFrame(); // ADDED on every frame ImGui::DockSpaceOverViewport(); /// <snip> ```
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ocornut/imgui#9563
No description provided.