diff options
author | runge <runge> | 2006-12-28 20:00:08 +0000 |
---|---|---|
committer | runge <runge> | 2006-12-28 20:00:08 +0000 |
commit | 5c9ba4bb035255956dd176b285df3a81bafa02e3 (patch) | |
tree | 29bfb0544fca31db024619a612d09b3a5e0132c2 /x11vnc/pointer.c | |
parent | f9baaf1ee49e7889808b1f058a5f348a9cd5f027 (diff) | |
download | libtdevnc-5c9ba4bb035255956dd176b285df3a81bafa02e3.tar.gz libtdevnc-5c9ba4bb035255956dd176b285df3a81bafa02e3.zip |
still more compiler warnings; ssvnc 1.0.9 sync.
Diffstat (limited to 'x11vnc/pointer.c')
-rw-r--r-- | x11vnc/pointer.c | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/x11vnc/pointer.c b/x11vnc/pointer.c index d550160..617da83 100644 --- a/x11vnc/pointer.c +++ b/x11vnc/pointer.c @@ -53,13 +53,14 @@ 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 (!from || !s) {} + return; +#else char *q; int to, i; int modisdown[256]; -#if NO_X11 - return; -#else q = *s; for (i=0; i<256; i++) { @@ -214,6 +215,10 @@ 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; /* @@ -223,9 +228,6 @@ void initialize_pointer_map(char *pointer_remap) { * from -buttonmap option. */ -#if NO_X11 - return; -#else if (!raw_fb_str) { X_LOCK; num_buttons = XGetPointerMapping(dpy, map, MAX_BUTTONS); @@ -299,12 +301,14 @@ void initialize_pointer_map(char *pointer_remap) { * Send a pointer position event to the X server. */ static void update_x11_pointer_position(int x, int y) { - int rc; - - RAWFB_RET_VOID #if NO_X11 + RAWFB_RET_VOID + if (!x || !y) {} return; #else + int rc; + + RAWFB_RET_VOID X_LOCK; if (use_xwarppointer) { @@ -339,11 +343,12 @@ static void update_x11_pointer_position(int x, int y) { } void do_button_mask_change(int mask, int button) { - int mb, k, i = button-1; - #if NO_X11 + if (!mask || !button) {} return; #else + int mb, k, i = button-1; + /* * this expands to any pointer_map button -> keystrokes * remappings. Usually just k=0 and we send one button event. @@ -408,14 +413,16 @@ void do_button_mask_change(int mask, int button) { * Send a pointer button event to the X server. */ static void update_x11_pointer_mask(int mask) { +#if NO_X11 + RAWFB_RET_VOID + if (!mask) {} + return; +#else int snapped = 0, xr_mouse = 1, i; last_event = last_input = last_pointer_input = time(NULL); RAWFB_RET_VOID -#if NO_X11 - return; -#else if (mask != button_mask) { last_pointer_click_time = dnow(); |