macosx11xorgxquartz

Enabling the xorg record module on Mac OS X Yosemite


I am in the process of porting some code over from Linux to Mac. I am a newbie to Mac so please bear with....

On Linux we have used XRecord from the X11 libraries for input capture. I am attempting to use XQuartz on the Mac as a substitute but have not been able to get it functioning.

I expect to see librecord.so in X11/lib/xorg/modules so that I can enable it by added Load "record" to my xorg.conf file but record.so is not there and I can't seem to find any reference online or in the XQuartz documentation to a way of adding it.

Consequently this code throws the expected error:

int major, minor;
if (XRecordQueryVersion(m_Info.m_Display, &major, &minor) != false)
{
    std::string logMessage = "XRecord version: %d.%d\n", major, minor;
    LOG4CXX_DEBUG (LOGGER, COMMON_STR (logMessage));
}
else
{
    THROW_EXCEPTION (errval::XRECORD_UNAVAILABLE);
}

Does anyone have any suggestions?


Solution

  • XRecord is an extension to X. Therefore, it can not be assumed to be present, even as an optionally-loaded component. XQuartz does not implement it.

    You would have to port it to OS X. That might entail building your own version of the X server, depending on whether XRecord requires non-standard hooks in the rest of the X server code.

    What were you hoping to do with the XRecord extension? If your goal was to record input system-wide on OS X, then it wasn't the right solution, anyway. On OS X, X11 is a secondary window system that's a guest (user app) on top of the native one. X11 does not generally see all input or windowing operations in the rest of the system.