Begin: Shuffled some code, _should_ have no side-effect. Clear NextWindowData in one call and more consistently. (merged from viewport branch to minimize branch drift).
Begin: Shuffled some code, _should_ have no side-effect. Clear NextWindowData in one call and more consistently. (merged from viewport branch to minimize branch drift).

nProtect/imgui,dougbinks/imgui,ggtucker/imgui,wflohry/imgui-addons,cmaughan/imgui,dougbinks/imgui,cmaughan/imgui,mikesart/imgui,ggtucker/imgui,ocornut/imgui,mikesart/imgui,ocornut/imgui,Flix01/imgui,aimotive/imgui-glfw,bkaradzic/imgui,cmaughan/imgui,ocornut/imgui,nProtect/imgui,cmaughan/imgui,nProtect/imgui,Flix01/imgui,aimotive/imgui-glfw,wflohry/imgui-addons,burningreggae/imgui,bkaradzic/imgui,ggtucker/imgui,bkaradzic/imgui,burningreggae/imgui,Flix01/imgui