From 00a9a0ea4d0f642b34b4423ea867099b52edf078 Mon Sep 17 00:00:00 2001 From: runge Date: Wed, 2 Dec 2009 22:09:51 -0500 Subject: x11vnc: -appshare mode for sharing an application windows instead of the entire desktop. map port + 5500 in reverse connect. Add id_cmd remote control functions for id (and other) windows. Allow zero port in SSL reverse connections. Adjust delays between multiple reverse connections; X11VNC_REVERSE_SLEEP_MAX env var. Add some missing mutex locks; add INPUT_LOCK and threads_drop_input. More safety in -threads mode for new framebuffer change. Fix some stderr leaking in -inetd mode. --- x11vnc/cursor.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'x11vnc/cursor.c') diff --git a/x11vnc/cursor.c b/x11vnc/cursor.c index 7ac0302..2ec93c3 100644 --- a/x11vnc/cursor.c +++ b/x11vnc/cursor.c @@ -576,7 +576,9 @@ void first_cursor(void) { return; } if (! show_cursor) { + LOCK(screen->cursorMutex); screen->cursor = NULL; + UNLOCK(screen->cursorMutex); } else { got_xfixes_cursor_notify++; set_rfb_cursor(get_which_cursor()); @@ -591,7 +593,7 @@ static void setup_cursors(void) { int w_in = 0, h_in = 0; static int first = 1; - if (verbose) { + if (verbose || use_threads) { rfbLog("setting up %d cursors...\n", CURS_MAX); } @@ -603,8 +605,8 @@ static void setup_cursors(void) { first = 0; if (screen) { - screen->cursor = NULL; LOCK(screen->cursorMutex); + screen->cursor = NULL; } for (i=0; icursorMutex); screen->cursor = NULL; + UNLOCK(screen->cursorMutex); set_cursor_was_changed(screen); } } @@ -1656,9 +1659,11 @@ static void set_cursor_was_changed(rfbScreenInfoPtr s) { return; } iter = rfbGetClientIterator(s); + LOCK(screen->cursorMutex); while( (cl = rfbClientIteratorNext(iter)) ) { cl->cursorWasChanged = TRUE; } + UNLOCK(screen->cursorMutex); rfbReleaseClientIterator(iter); } -- cgit v1.2.1