diff options
Diffstat (limited to 'x11vnc/pointer.c')
-rw-r--r-- | x11vnc/pointer.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/x11vnc/pointer.c b/x11vnc/pointer.c index 8315fac..100496b 100644 --- a/x11vnc/pointer.c +++ b/x11vnc/pointer.c @@ -54,7 +54,7 @@ static prtremap_t pointer_map[MAX_BUTTONS+1][MAX_BUTTON_EVENTS]; * For parsing the -buttonmap sections, e.g. "4" or ":Up+Up+Up:" */ static void buttonparse(int from, char **s) { -#if NO_X11 +#if (0 && NO_X11) if (!from || !s) {} return; #else @@ -130,7 +130,11 @@ static void buttonparse(int from, char **s) { */ char *str; X_LOCK; +#if NO_X11 + kcode = NoSymbol; +#else kcode = XKeysymToKeycode(dpy, ksym); +#endif pointer_map[from][n].keysym = ksym; pointer_map[from][n].keycode = kcode; @@ -216,10 +220,6 @@ static void buttonparse(int from, char **s) { * process the -buttonmap string */ void initialize_pointer_map(char *pointer_remap) { -#if NO_X11 - if (!pointer_remap) {} - return; -#else unsigned char map[MAX_BUTTONS]; int i, k; /* @@ -230,9 +230,13 @@ void initialize_pointer_map(char *pointer_remap) { */ if (!raw_fb_str) { +#if NO_X11 + num_buttons = 5; +#else X_LOCK; num_buttons = XGetPointerMapping(dpy, map, MAX_BUTTONS); X_UNLOCK; +#endif } else { num_buttons = 5; } @@ -295,7 +299,6 @@ void initialize_pointer_map(char *pointer_remap) { } free(remap); } -#endif /* NO_X11 */ } /* |