2009/3/18 Vincent Povirk madewokherd+8cd9@gmail.com:
On Tue, Mar 17, 2009 at 4:50 PM, Nicolas Le Cam niko.lecam@gmail.com wrote:
Tell me if you have a better solution.
You should add some traces first to find out what window is getting this notification and when. The test data currently doesn't have enough information to decide on a correct fix.
Vincent Povirk
On Win2k after the last SHAppBarMessage(ABM_REMOVE, &abd) call, a ABN_POSCHANGED is sent to windows[2].hwnd, but at that time user data has been set to null :
Remove first appbar * second appbar receives ABN_POSCHANGED notification * third appbar receives ABN_POSCHANGED notification Remove second appbar * third appbar receives ABN_POSCHANGED notification Remove third appbar * third appbar receives ABN_POSCHANGED notification
In short, it ignores the ABN_POSCHANGED notification with null user data if it's the last appbar being removed that receives it.
The current patch only change the test's behaviour for this case, as registered_count will only be null before the last SHAppBarMessage(ABM_REMOVE, &abd) call (and before the first SHAppBarMessage(ABM_NEW, &abd) call but at that time you can't get notifications)