mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
simplify xorg condition.
This commit is contained in:
parent
80550350a8
commit
ac7200c630
@ -52,15 +52,16 @@ void XScroll(int x, int y) {
|
||||
}
|
||||
|
||||
void XButton(unsigned int button, int down) {
|
||||
if (button != 0) {
|
||||
if (button == 0) return;
|
||||
|
||||
Display *display = getXDisplay();
|
||||
XTestFakeButtonEvent(display, button, down, CurrentTime);
|
||||
XSync(display, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void XKey(unsigned long key, int down) {
|
||||
if (key != 0) {
|
||||
if (key == 0) return;
|
||||
|
||||
Display *display = getXDisplay();
|
||||
KeyCode code = XKeysymToKeycode(display, key);
|
||||
|
||||
@ -78,7 +79,6 @@ void XKey(unsigned long key, int down) {
|
||||
|
||||
XTestFakeKeyEvent(display, code, down, CurrentTime);
|
||||
XSync(display, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void XGetScreenConfigurations() {
|
||||
|
Loading…
Reference in New Issue
Block a user