Jeremy White jwhite@codeweavers.com writes:
However, this makes it clear to me that the yield in message.c is largely moot; you need to remove both that one and the one in ntdll/sync.c to have any material effect on Wine timing with messages.
Actually it should be enough to not yield in MsgWaitForMultipleObjects when we are only checking for X events, and that would be correct IMO since the check for X events is always in addition to the normal behavior. Something like this should do it:
Index: dlls/x11drv/event.c =================================================================== RCS file: /opt/cvs-commit/wine/dlls/x11drv/event.c,v retrieving revision 1.56 diff -u -p -r1.56 event.c --- dlls/x11drv/event.c 25 Jul 2005 11:08:43 -0000 1.56 +++ dlls/x11drv/event.c 3 Aug 2005 08:28:52 -0000 @@ -295,12 +295,13 @@ DWORD X11DRV_MsgWaitForMultipleObjectsEx
data->process_event_count++; if (process_events( data->display, mask )) ret = count; - else + else if (count || timeout) { ret = WaitForMultipleObjectsEx( count+1, new_handles, flags & MWMO_WAITALL, timeout, flags & MWMO_ALERTABLE ); if (ret == count) process_events( data->display, mask ); } + else ret = WAIT_TIMEOUT; data->process_event_count--; return ret; }