-
Notifications
You must be signed in to change notification settings - Fork 186
Closed
Description
The call xlib::XSynchronize(dpy_control, 1); in src/linux/listen.rs is necessary to pass tests, but I can't find any documentation indicating that it should be. In particular https://www.x.org/releases/X11R7.6/doc/libXtst/recordlib.html does not mention it. In fact the only documentation I could find on XSynchronize seems to indicate that synchronization will tank performance!
In particular, disabling XSynchronize repeatably causes the listen_and_simulate test to fail with
X Error of failed request: XRecordBadContext
Major opcode of failed request: 146 (RECORD)
Minor opcode of failed request: 5 (XRecordEnableContext)
Context in failed request: 0x4e00001
Serial number of failed request: 10
Current serial number in output stream: 10
Do you have any idea why this error happens? I think it might have to do with Xlib not being thread-safe (listen_and_simulate uses 2 threads), but that's really only a guess.
Metadata
Metadata
Assignees
Labels
No labels