Extremely useful piece of code that should be pinned somewhere, anywhere. It also takes into account the visibility of the widgets ( not hit-testable widgets don’t block the ‘trace’ to the viewport). I was getting desperate to find a good solution to this so thanks a lot.