Skip to content

Commit

Permalink
Docking: Fixed size constraints not working on single window holding …
Browse files Browse the repository at this point in the history
…on a dock id (still doesn't work on docked windows).
  • Loading branch information
ocornut committed Feb 2, 2022
1 parent d378e40 commit c1ab3c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs/CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ Other Changes:

Docking+Viewports Branch:

- Docking: Fixed a CTRL+TAB crash when aiming at an empty docked window. (#4792)
- Docking: Fixed size constraints not working on single window holding on a dock id (still doesn't work on docked windows).
- Viewports, IO: Added io.AddMouseViewportEvent() function to queue hovered viewport change (when known by backend).
- Viewports: Relaxed specs for backend supporting ImGuiBackendFlags_HasMouseHoveredViewport: it is now _optional_
for the backend to have to ignore viewports with the _NoInputs flag when call io.AddMouseViewportEvent(). It is
Expand All @@ -240,7 +242,6 @@ Docking+Viewports Branch:
io.AddMouseViewportEvent() function, then Dear ImGui will revert to its flawed heuristic to find the viewport under.
By lowering those specs, we allow the SDL and more backend to support this, only relying on the heuristic in a few
drag and drop situations rather that relying on it everywhere.
- Docking: Fixed a CTRL+TAB crash when aiming at an empty docked window. (#4792)
- Viewports: Fixed a CTRL+TAB crash with viewports enabled when the window list needs to appears in
its own viewport (regression from 1.86). (#4023, #787)
- Viewports: Fixed active InputText() from preventing viewports to merge. (#4212)
Expand Down
3 changes: 2 additions & 1 deletion imgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6383,7 +6383,8 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
IM_ASSERT(window->DockNode != NULL);

// Docking currently override constraints
g.NextWindowData.Flags &= ~ImGuiNextWindowDataFlags_HasSizeConstraint;
if (window->DockIsActive)
g.NextWindowData.Flags &= ~ImGuiNextWindowDataFlags_HasSizeConstraint;

// Amend the Appearing flag
if (window->DockTabIsVisible && !dock_tab_was_visible && dock_node_was_visible && !window->Appearing && !window_was_appearing)
Expand Down

0 comments on commit c1ab3c4

Please sign in to comment.