shell32/tests: accept delays in getting ABN_POSCHANGED notifications
madewokherd+8cd9 at gmail.com
Sun Sep 21 19:17:43 CDT 2008
Currently, the test for SHAppBarMessage sends ABM_SETPOS messages,
processes queued events (responding to ABN_POSCHANGED notifications by
asking to reserve space for them), and checks that the reserved
rectangles for its appbars do not intersect. If an appbar does not get
an ABN_POSCHANGED notification in time, its reserved rectangle may
still intersect other appbars, causing the test to fail. If the
notifications are posted before SHAppBarMessage returns, this can
never happen, but it seems Windows does not guarantee this.
I'd prefer to process events for a few seconds so the system has time
to reach an equilibrium, but I was told this causes an unnecessary
The solution is to continue processing events until the expected
condition is true (usually, no reserved rectangles intersect) or 3
seconds pass. This should eliminate the race condition (unless it
takes absurdly long to get the notifications) without causing
unnecessary delays when the test succeeds.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 20246 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20080921/a3cddbcc/attachment-0001.patch
More information about the wine-patches