As far as I can tell, there's no formal order defined for whether a window will receive an expose event or window activation event first.
qtestlib has both qWaitForWindowActive and qWaitForWindowExposed, and they are used interchangeably in test code for "wait for the window to be ready".
This is a problem for tests that should qWaitForWindowExposed, but call qWaitForWindowActive thinking activation happens after expose, and run on a platform where that's not the case.
We should either formalize it, and make platforms behave, or add a testlib function to qWaitForWindowReadyAndMappedAndGeometryStable, etc etc.
On macOS we end up with active before exposed because we send window activation from both aa[QNSView becomeFirstResponder] and QCocoaWindow::windowDidBecomeKey(). We should probably only do the latter, which happens after expose.