IO: Fixed AddFocusEvent(false) to also clear MouseDown[] state. (#4921)

This commit is contained in:
ocornut
2022-10-27 20:17:19 +02:00
parent a61bbdc239
commit a241dc7990
2 changed files with 4 additions and 0 deletions

View File

@ -1303,6 +1303,9 @@ void ImGuiIO::ClearInputKeys()
}
KeyCtrl = KeyShift = KeyAlt = KeySuper = false;
KeyMods = ImGuiMod_None;
MousePos = ImVec2(-FLT_MAX, -FLT_MAX);
memset(MouseDown, 0, sizeof(MouseDown));
MouseWheel = MouseWheelH = 0.0f;
}
static ImGuiInputEvent* FindLatestInputEvent(ImGuiInputEventType type, int arg = -1)