I've been having issues getting XF86MiscSetMouseSettings() to work. I've put together a really simple test case (attached) that results in the following error:

X Error of failed request: 139
Major opcode of failed request: 136 (XFree86-Misc)
Minor opcode of failed request: 5 (XF86MiscSetMouseSettings)
Value in failed request: 0x3a
Serial number of failed request: 9
Current serial number in output stream: 10

Could somebody tell me what's wrong with my test case, or if this is a bug in the xf86misc extension? I'd really appreciate it.

Thanks,

Michael
#include <X11/Xlib.h>
#include <X11/extensions/xf86misc.h>

int main (int argc, char *argv[]) {
  Display* dpy = XOpenDisplay(":0.0");
  XF86MiscMouseSettings mouse_settings;

  XF86MiscGetMouseSettings(dpy, &mouse_settings);
  XF86MiscGetMouseSettings(dpy, &mouse_settings);
  XF86MiscGetMouseSettings(dpy, &mouse_settings);
//   XF86MiscSetMouseSettings(dpy, &mouse_settings);

  // Any X call here appears to cause an error
  XF86MiscGetMouseSettings(dpy, &mouse_settings);
}
test: testmouse.c
        gcc -o testmouse testmouse.c -L/usr/X11R6/lib -lXxf86misc -lXext -lX11

Reply via email to