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/xevents.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/xevents.c')
-rw-r--r-- | x11vnc/xevents.c | 43 |
1 files changed, 27 insertions, 16 deletions
diff --git a/x11vnc/xevents.c b/x11vnc/xevents.c index 50c96bf..1e24b39 100644 --- a/x11vnc/xevents.c +++ b/x11vnc/xevents.c @@ -75,6 +75,11 @@ void initialize_clipboard_atom(void) { } static void initialize_xevents(int reset) { +#if NO_X11 + RAWFB_RET_VOID + if (!reset) {} + return; +#else static int did_xselect_input = 0; static int did_xcreate_simple_window = 0; static int did_vnc_connect_prop = 0; @@ -85,9 +90,6 @@ static void initialize_xevents(int reset) { static int did_xrandr = 0; RAWFB_RET_VOID -#if NO_X11 - return; -#else if (reset) { did_xselect_input = 0; @@ -165,10 +167,13 @@ static void print_xevent_bases(void) { } static void get_prop(char *str, int len, Atom prop) { + int i; +#if !NO_X11 Atom type; - int format, slen, dlen, i; + int format, slen, dlen; unsigned long nitems = 0, bytes_after = 0; unsigned char* data = NULL; +#endif for (i=0; i<len; i++) { str[i] = '\0'; @@ -205,6 +210,10 @@ static void get_prop(char *str, int len, Atom prop) { } static void bust_grab(int reset) { +#if NO_X11 + if (!reset) {} + return; +#else static int bust_count = 0; static time_t last_bust = 0; time_t now = time(NULL); @@ -218,9 +227,6 @@ static void bust_grab(int reset) { bust_count = 0; return; } -#if NO_X11 - return; -#else x = 0; y = 0; @@ -465,6 +471,11 @@ static int process_watch(char *str, int parent, int db) { } static void grab_buster_watch(int parent, char *dstr) { +#if NO_X11 + RAWFB_RET_VOID + if (!parent || !dstr) {} + return; +#else Atom ticker_atom = None; int sleep = sync_tod_delay * 921 * 1000; char propval[200]; @@ -472,9 +483,6 @@ static void grab_buster_watch(int parent, char *dstr) { int db = 0; RAWFB_RET_VOID -#if NO_X11 - return; -#else if (grab_buster > 1) { db = 1; @@ -577,6 +585,10 @@ void spawn_grab_buster(void) { } void sync_tod_with_servertime(void) { +#if NO_X11 + RAWFB_RET_VOID + return; +#else static Atom ticker_atom = None; XEvent xev; char diff[128]; @@ -585,9 +597,6 @@ void sync_tod_with_servertime(void) { int i, db = 0; RAWFB_RET_VOID -#if NO_X11 - return; -#else if (! ticker_atom) { ticker_atom = XInternAtom(dpy, "X11VNC_TICKER", False); @@ -733,6 +742,11 @@ void check_autorepeat(void) { * and other X11 events and respond to them as needed. */ void check_xevents(int reset) { +#if NO_X11 + RAWFB_RET_VOID + if (!reset) {} + return; +#else XEvent xev; int tmp, have_clients = 0; static int sent_some_sel = 0; @@ -748,9 +762,6 @@ void check_xevents(int reset) { if (unixpw_in_progress) return; RAWFB_RET_VOID -#if NO_X11 - return; -#else if (now > last_init_check+1 || reset) { last_init_check = now; |