FX testing needs to be able to detect when certain operations are "complete".
Two operations that are known:
1) Something like 'XSync', where any pending window operations are known to be completed. For example:
* for show(), that a window is now visible
* for resize(), that any pending wmgr operations are complete, and events reported.
This is particularly of interest for GTK/X11 which has potential delays for wmgr operations, and for Mac with its full screen animation.
2) rendering operations are complete. This includes
* layout is not dirty
* no SG nodes are dirty.
* no paint operations are pending
Clearly there are issues with any form of animation, as there would be a constant stream of changes, making any "complete" statement difficult to define, much less detect. Handling the case where there is not animation would be valuable in itself.
Given that there are a number of possible callbacks that must happen on the User Event thread - these calls cannot be blocking. Perhaps the best option would be for the caller to provide a runnable that could be called (on the UE thread ?) when the appropriate state is detected.
If we start with an assumption that we have two callbacks - then the test developer can use the combination needed for checking state, for example the first call might need to be:
but subsequent calls to the same window might only need "notifyRenderComplete"