From 1038dd109ade1bc3afe3b96f141f1c22aa1a5742 Mon Sep 17 00:00:00 2001 From: mbattista Date: Sat, 10 Apr 2021 23:48:23 +0000 Subject: [PATCH] more cleanup --- server/internal/xorg/xorg.c | 6 +++--- server/internal/xorg/xorg.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/server/internal/xorg/xorg.c b/server/internal/xorg/xorg.c index 885dbd4..ab716ee 100644 --- a/server/internal/xorg/xorg.c +++ b/server/internal/xorg/xorg.c @@ -126,9 +126,9 @@ KeyCode XkbKeysymToKeycode(KeySym keysym) { return keycode; } -int XKey(unsigned long key, int down) { +void XKey(unsigned long key, int down) { Display *display = getXDisplay(); - KeyCode code = -2; + KeyCode code = 0; code = XkbKeysymToKeycode(key); if (!code) { @@ -142,7 +142,7 @@ int XKey(unsigned long key, int down) { XChangeKeyboardMapping(display, code, numcodes, keysym_list, 1); } if (!code) - return -1; + return; XTestFakeKeyEvent(display, code, down, CurrentTime); XSync(display, 0); } diff --git a/server/internal/xorg/xorg.h b/server/internal/xorg/xorg.h index e561c2d..5e10260 100644 --- a/server/internal/xorg/xorg.h +++ b/server/internal/xorg/xorg.h @@ -27,7 +27,7 @@ void XMove(int x, int y); void XScroll(int x, int y); void XButton(unsigned int button, int down); - int XKey(unsigned long key, int down); + void XKey(unsigned long key, int down); void XClipboardSet(char *src); char *XClipboardGet();