There is an explanation in the linked MR which I think makes sense. Drivers' (winex11, winemac) MsgWaitForMultipleObjectsEx returns 'count - 1' if process_events() adds some events. Which doesn't work exactly straightforward if count is 0. The original MR suggests changing the drivers' convention around return value (maybe is a bit wrong way, although that should still be possible to do right). It seems to me that it maybe doesn't worth it (as driver's MsgWaitForMultipleObjectsEx convention is ok for a sane case of non-zero events count). So I am suggesting to do it simpler and rather handle this special peekmessage case with 0 handle count.