Viewports: Fix issue inferring viewport z-order when new popups gets created. (#3734) + Metrics updates.

Revert 6bc52667
Showing inferred order and missing flags in metrics.
This commit is contained in:
ocornut
2021-02-10 14:30:18 +01:00
parent 2a5eaf239f
commit 3607c42bec
2 changed files with 41 additions and 8 deletions

View File

@ -1531,6 +1531,7 @@ struct ImGuiContext
ImGuiViewportP* CurrentViewport; // We track changes of viewport (happening in Begin) so we can call Platform_OnChangedViewport()
ImGuiViewportP* MouseViewport;
ImGuiViewportP* MouseLastHoveredViewport; // Last known viewport that was hovered by mouse (even if we are not hovering any viewport any more) + honoring the _NoInputs flag.
ImGuiID PlatformLastFocusedViewportId;
int ViewportFrontMostStampCount; // Every time the front-most window changes, we stamp its viewport with an incrementing counter
// Gamepad/keyboard Navigation
@ -1752,6 +1753,7 @@ struct ImGuiContext
CurrentDpiScale = 0.0f;
CurrentViewport = NULL;
MouseViewport = MouseLastHoveredViewport = NULL;
PlatformLastFocusedViewportId = 0;
ViewportFrontMostStampCount = 0;
NavWindow = NULL;