Rémi Bernon (@rbernon) commented about dlls/winex11.drv/clipboard.c:
- if (xevent->type == PropertyNotify &&
xevent->xproperty.window == xwindow &&xevent->xproperty.atom == x11drv_atom(__wine_timestamp_prop))- return True;
- return False;
+}
+/**************************************************************************
get_server_time
- Get the current X11 server timestamp by generating a PropertyNotify event
- */
+static Time get_server_time( Display *display, Window win )
This looks complicated and we probably don't want to touch the X11 event queue outside of ProcessEvents. There's already `EVENT_x11_time_to_win32_time` which estimates the X server time, and it is used in `set_input_focus` for the same kind of purpose as you need here.
It might not be very accurate though, and if you need it to be, maybe it would be better to find a way to detect remote vs local X server and check / assume that a local server uses `clock_gettime` / `CLOCK_MONOTONIC` for its time which I believe most if not all implementations do (or some other clock, I'm not 100% confident).