From f8dc03d7022a00156cef3e4d228774289d9178df Mon Sep 17 00:00:00 2001 From: ocornut Date: Wed, 18 Oct 2023 16:36:35 +0200 Subject: [PATCH] Windows: Can also auto-resize by double-clicking lower-left resize grip (not only lower-right one). --- docs/CHANGELOG.txt | 1 + imgui.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/CHANGELOG.txt b/docs/CHANGELOG.txt index aa00b69e..b63338bf 100644 --- a/docs/CHANGELOG.txt +++ b/docs/CHANGELOG.txt @@ -73,6 +73,7 @@ Other changes: - Windows: - Popups: clarified meaning of 'p_open != NULL' in BeginPopupModal() + set back user value to false when popup is closed in ways other than clicking the close button. (#6900) + - Can also auto-resize by double-clicking lower-left resize grip (not only lower-right one). - Separators: - Altered end-points to use more standard boundaries. (#205, #4787, #1643) Left position is always current cursor X position. diff --git a/imgui.cpp b/imgui.cpp index df3bf112..998f53b4 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -5884,7 +5884,7 @@ static bool ImGui::UpdateWindowManualResize(ImGuiWindow* window, const ImVec2& s if (hovered || held) g.MouseCursor = (resize_grip_n & 1) ? ImGuiMouseCursor_ResizeNESW : ImGuiMouseCursor_ResizeNWSE; - if (held && g.IO.MouseClickedCount[0] == 2 && resize_grip_n == 0) + if (held && g.IO.MouseClickedCount[0] == 2) { // Manual auto-fit when double-clicking size_target = CalcWindowSizeAfterConstraint(window, size_auto_fit);