mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-07 22:03:19 +00:00
Merge branch 'master' into docking
# Conflicts: # backends/imgui_impl_sdl2.cpp # backends/imgui_impl_sdl3.cpp # imgui_demo.cpp
This commit is contained in:
@@ -638,7 +638,12 @@ bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool
|
||||
g.ActiveIdClickOffset = g.IO.MousePos - bb.Min;
|
||||
|
||||
const int mouse_button = g.ActiveIdMouseButton;
|
||||
if (IsMouseDown(mouse_button, test_owner_id))
|
||||
if (mouse_button == -1)
|
||||
{
|
||||
// Fallback for the rare situation were g.ActiveId was set programmatically or from another widget (e.g. #6304).
|
||||
ClearActiveID();
|
||||
}
|
||||
else if (IsMouseDown(mouse_button, test_owner_id))
|
||||
{
|
||||
held = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user