知道为什么我会收到此错误吗?:
error: ‘BadDevice’ was not declared in this scope
我已经包括:
#include <X11/Xlib.h>
和
#include <X11/extensions/XInput2.h>
在我的类头文件中。
我这样使用它:
int ret = XIGrabDevice(display_, 2, LinuxInputManager::getWindow(),
CurrentTime, None, GrabModeAsync,
GrabModeAsync, False, &eventMask_);
if (ret == BadValue)
std::cout << "bad value" << std::endl;
else if (ret == BadDevice)
std::cout << "BadDevice" << std::endl;
if (ret == BadMatch)
std::cout << "BadMatch" << std::endl;
if (ret == BadWindow)
std::cout << "BadWindow" << std::endl;
if (ret) {
std::cout << "not available 3" << std::endl;
}
干杯
贾勒特