mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-26 05:27:01 +00:00
Fixed cases where CTRL+Tab or Modal can occasionally lead to the creation of ImDrawCmd with zero triangles. (#4857, #5937)
Amend b0a6cd6
This commit is contained in:
parent
66ad2ad539
commit
9825f7fa87
@ -39,6 +39,9 @@ Breaking changes:
|
|||||||
|
|
||||||
Other changes:
|
Other changes:
|
||||||
|
|
||||||
|
- Fixed cases where CTRL+Tab or Modal can occasionally lead to the creation of ImDrawCmd with
|
||||||
|
zero triangles, which would makes the render loop of some backends assert (e.g. Metal with
|
||||||
|
debugging, Allegro). (#4857, #5937)
|
||||||
- Inputs, Scrolling: better selection of scrolling window when hovering nested windows
|
- Inputs, Scrolling: better selection of scrolling window when hovering nested windows
|
||||||
and when backend/OS is emitting dual-axis wheeling inputs (typically touch pads on macOS).
|
and when backend/OS is emitting dual-axis wheeling inputs (typically touch pads on macOS).
|
||||||
We now select a primary axis based on recent events, and select a target window based on it.
|
We now select a primary axis based on recent events, and select a target window based on it.
|
||||||
|
@ -449,8 +449,7 @@ void ImDrawList::_PopUnusedDrawCmd()
|
|||||||
{
|
{
|
||||||
if (CmdBuffer.Size == 0)
|
if (CmdBuffer.Size == 0)
|
||||||
return;
|
return;
|
||||||
ImDrawCmd* curr_cmd = &CmdBuffer.Data[CmdBuffer.Size - 1];
|
for (ImDrawCmd* curr_cmd = &CmdBuffer.Data[CmdBuffer.Size - 1]; curr_cmd->ElemCount == 0 && curr_cmd->UserCallback == NULL; curr_cmd--)
|
||||||
if (curr_cmd->ElemCount == 0 && curr_cmd->UserCallback == NULL)
|
|
||||||
CmdBuffer.pop_back();
|
CmdBuffer.pop_back();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user