Esme Povirk (@madewokherd) commented about dlls/winex11.drv/clipboard.c:
+ XGetWindowAttributes( display, win, &attrs ); + XSelectInput( display, win, attrs.your_event_mask | PropertyChangeMask ); + + /* Generate a PropertyNotify event to get server time */ + XChangeProperty( display, win, timestamp_prop, XA_INTEGER, 8, PropModeReplace, NULL, 0 ); + XSync( display, False ); + + /* Wait for the PropertyNotify event */ + while (XCheckTypedWindowEvent( display, win, PropertyNotify, &event )) + { + if (event.xproperty.atom == timestamp_prop) + { + timestamp = event.xproperty.time; + break; + } + } This might remove unrelated events from the queue, though that won't matter for its current use case.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/9418#note_121524