From 159d2b63f08392298040f0b6fb06fdc171efd54d Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Mon, 17 Feb 2020 20:52:49 -0600 Subject: [PATCH 1/2] - Removed and added comments --- kintox11/src/kintox11.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/kintox11/src/kintox11.c b/kintox11/src/kintox11.c index cf599db..d46d453 100644 --- a/kintox11/src/kintox11.c +++ b/kintox11/src/kintox11.c @@ -47,32 +47,19 @@ static int wait_fd(int fd, double seconds) int XNextEventTimeout(Display *d, XEvent *e, double seconds, long long event_ts, int last_event, long long *event_ts_ptr, int *last_event_ptr) { if (XPending(d) || wait_fd(ConnectionNumber(d),seconds)) { - // XNextEvent(d, e); - // while (1) { - // XNextEvent(d, e); - // if(e->type != 16){ - // printf("Inside XNextEvent timeout\n"); - // break; - // } - // } while (1) { XNextEvent(d, e); long long int new_ts = timeInMilliseconds(); + // Make sure window dragging or resizing is not occuring if(!(e->type == 22 && (e->type == last_event) && timeInMilliseconds()-event_ts < 419)){ - // printf("%d == %d\n",e->type, last_event); - // printf("Timestamp: %lld\n",timeInMilliseconds()-event_ts); *event_ts_ptr = new_ts; *last_event_ptr = e->type; - // printf("in event_ts_ptr: %lld\n",*event_ts_ptr); - // printf("in last_event_ptr: %d\n",*last_event_ptr); break; } *event_ts_ptr = new_ts; *last_event_ptr = e->type; - // printf("event_ts_ptr: %lld\n",*event_ts_ptr); - // printf("last_event_ptr: %d\n",*last_event_ptr); } return 0; } else { @@ -541,15 +528,12 @@ int main(void){ system(run_offInput); ran_onInput = 0; } - // e.type = Expose; - // e.xexpose.count = 0; } } else{ - // XNextEvent(d, &e); while (1) { XNextEvent(d, &e); - + // Make sure window dragging or resizing is not occuring if(!(e.type == 22 && (e.type == last_event) && timeInMilliseconds()-event_ts < 300)){ // printf("%d == %d\n",e.type, last_event); // printf("Timestamp: %lld\n",timeInMilliseconds()-event_ts); From 4e75cfb047e665d760bdbf6cdf1da573a88daf01 Mon Sep 17 00:00:00 2001 From: Ben Reaves Date: Mon, 17 Feb 2020 22:00:43 -0600 Subject: [PATCH 2/2] - Updated readme --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 24e0940..4040c8c 100644 --- a/README.md +++ b/README.md @@ -32,20 +32,22 @@ Kinto works for standard Windows, Apple and Chromebook keyboards. The following - Python (initial install only) - systemd - x11 -- IBus +- IBus* - Debian/Ubuntu based distro 16.04+ If you need kintox11 recompiled for your distro please let me know and I will add a binary for your distro if my binary fails. You can also attempt to compile kintox11.c on your system as well, but you will need to compile and install json-c first as its libraries will be required to compile and run the program. -IBUS is needed to support wordwise during browser app usage as the keymap will need to change slightly depending if the cursor/caret is on screen waiting for input. You may install ibus with the following. +*IBUS is needed to support wordwise during browser app usage as the keymap will need to change slightly depending if the cursor/caret is on screen waiting for input. You may install ibus with the following. ``` ibus-setup +im-config -n ibus ``` +!! Please logoff and back on for IBus change to take effect! -And then navigate to your "Language Support" and set "Keyboard input method system:" to IBus for full word-wise support with web browsers. +To confirm navigate to your "Language Support" and set "Keyboard input method system:" to IBus for full word-wise support with web browsers. Wayland support is planned, but not ready yet.