Skip to content

Commit a0bfbe4

Browse files
committed
Windows: BgClickFlags inherited by default + missing info in Changelog. Amend 40f9e4e. (#899, #3071, #5044, #3379)
1 parent e674f57 commit a0bfbe4

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

docs/CHANGELOG.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ Other Changes:
5050
- Tables: Angled headers: fixed an auto-resize feedback loop that could
5151
affect tables with empty non-resizing columns using angled headers, making
5252
them typically flicker back and forth between +0 and +1 pixels.
53+
- Windows: io.ConfigWindowsMoveFromTitleBarOnly is latched during Begin(),
54+
effectively allowing to change the value on a per-window basis (although
55+
there is a better internal mechanism for it).
5356
- Disabled: fixed a bug when a previously enabled item that got nav focus
5457
and then turns disabled could still be activated using keyboard. (#9036)
5558
- InputText: when buffer is not resizable, trying to paste contents that

imgui.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7949,7 +7949,7 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
79497949
// Set default BgClickFlags
79507950
// This is set at the end of this function, so UpdateManualResize()/ClampWindowPos() may use last-frame value if overriden by user code.
79517951
// FIXME: The general intent is that we will later expose config options to default to enable scrolling + select scrolling mouse button.
7952-
window->BgClickFlags = g.IO.ConfigWindowsMoveFromTitleBarOnly ? ImGuiWindowBgClickFlags_None : ImGuiWindowBgClickFlags_Move;
7952+
window->BgClickFlags = (flags & ImGuiWindowFlags_ChildWindow) ? parent_window->BgClickFlags : (g.IO.ConfigWindowsMoveFromTitleBarOnly ? ImGuiWindowBgClickFlags_None : ImGuiWindowBgClickFlags_Move);
79537953

79547954
// We fill last item data based on Title Bar/Tab, in order for IsItemHovered() and IsItemActive() to be usable after Begin().
79557955
// This is useful to allow creating context menus on title bar only, etc.

0 commit comments

Comments
 (0)