Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.10
-
None
Description
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.
Attachments
Issue Links
- relates to
-
QTBUG-52594 Make a platform-aware qWaitForWindowExposed()/Active()
- Reported
-
QTBUG-63987 qtestlib doc: create a section on common patterns and good practices
- Reported
- resulted from
-
QTBUG-50414 OS X: Move expose event handling to [QNSView drawRect]
- Closed