我正在尝试运行此主题(第一个答案)中的代码:getting mouseclick coordinates with Xlib它给了我一些错误。
输出:
$ ./a.out
X Error of failed request: BadAccess (attempt to access private resource denied)
Major opcode of failed request: 2 (X_ChangeWindowAttributes)
Serial number of failed request: 8
Current serial number in output stream: 8
最佳答案
应该使用:gcc c.cc -lX11
并将一个字符串更改为:XSelectInput(display, root, ButtonReleaseMask);
关于c - 尝试获取鼠标点击坐标时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34020875/