Viewports: fix/amend dcb6335 to (1) avoid refocusing when focus action was actionned from a click within imgui boundaries and (2) restore a null focus as well. (#6299)
@ -1738,6 +1738,7 @@ struct ImGuiViewportP : public ImGuiViewport
ImVec2LastPos;
ImVec2LastPos;
floatAlpha;// Window opacity (when dragging dockable windows/viewports we make them transparent)
floatAlpha;// Window opacity (when dragging dockable windows/viewports we make them transparent)
floatLastAlpha;
floatLastAlpha;
boolLastFocusedHadNavWindow;// Instead of maintaining a LastFocusedWindow (which may harder to correctly maintain), we merely store weither NavWindow != NULL last time the viewport was focused.
shortPlatformMonitor;
shortPlatformMonitor;
intDrawListsLastFrame[2];// Last frame number the background (0) and foreground (1) draw lists were used
intDrawListsLastFrame[2];// Last frame number the background (0) and foreground (1) draw lists were used
ImDrawList*DrawLists[2];// Convenience background (0) and foreground (1) draw lists. We use them to draw software mouser cursor when io.MouseDrawCursor is set and to draw most debug overlays.
ImDrawList*DrawLists[2];// Convenience background (0) and foreground (1) draw lists. We use them to draw software mouser cursor when io.MouseDrawCursor is set and to draw most debug overlays.
@ -1751,7 +1752,7 @@ struct ImGuiViewportP : public ImGuiViewport
ImVec2BuildWorkOffsetMin;// Work Area: Offset being built during current frame. Generally >= 0.0f.
ImVec2BuildWorkOffsetMin;// Work Area: Offset being built during current frame. Generally >= 0.0f.
ImVec2BuildWorkOffsetMax;// Work Area: Offset being built during current frame. Generally <= 0.0f.
ImVec2BuildWorkOffsetMax;// Work Area: Offset being built during current frame. Generally <= 0.0f.