how can i check mouse clicks in the Linux without using events?
my windows code for doing it is:
bool Mouse::isKeyDown(int key) const{ return ((GetKeyState(key) & 0x80) > 0);}
bool Mouse::isKeyDown(int key) const{ return ((GetKeyState(key) & 0x80) > 0);}
Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]
Display *display;Window window;bool Mouse::isKeyDown(int key) const{ const unsigned int masks[5] = { Button1Mask, Button2Mask, Button3Mask, Button4Mask, Button5Mask }; Window root, child; int root_x, root_y, child_x, child_y; unsigned int mask; if(key < 0 || key >= sizeof(masks)/sizeof(masks[0])) return false; XQueryPointer(display, window, &root, &child, &root_x, &root_y, &child_x, &child_y, &mask); return ((mask & masks[key]) > 0);}