- Updated to version 0.9.16 which is now part of libvncserver as in page http://www.karlrunge.com/x11vnc/ there is sentence x11vnc is a contributed program to the LibVNCServer project at SourceForge.net or https://github.com/LibVNC/x11vnc Changes: * Build fixes. * Misc. documentation fixes. * Misc. buffer overflow and memleak fixes. * Support for OpenSSL 1.1.0. * Fix for Debian bug #672435. * Added support for the X Composite Extension. For subwindow/appshare modes this allows sharing the respective window/app when it is partially or completely off-screen as XComposite renders the window contents to an off-screen buffer. Before, updating of the window contents would stop once it went even partially off-screen. * Added XInput 2 multi-pointer support which allows multiple clients to view and control a single shared screen, all having their own mouse pointers and keyboard foci. For in-depth info, read http://edoc.hu-berlin.de/master/beier-christian-2011-07-19/PDF/beier.pdf, especially section 5.1. Added some support for running under Wayland via the deskshot utility found in the misc/ subdirectory. - miscellaneous new features and changes: * Separated x11vnc sources from LibVNCServer. The project is now hosted at GitHub under https://github.com/LibVNC/x11vnc/. * Deleted patches - 0001-Fix-openssl-1.1.x-detection.patch this is upstreamed - 0002-Support-openssl-1.1.0.patch this is upstreamed - x11vnc-automake-1.13.patch this not needed anymore - x11vnc-fix-buffer-overflow-in-record_CW.patch this is upstreamed - x11vnc-fix-buffer-overflow-in-snapshot_stack_list.patch this is upstreamed - x11vnc-lame-libm.diff FFMpeg/Lame has been removed - x11vnc-lib64.diff Zlib is correctly found by configure.ac * Modified patches - 10_usepkgconfig.diff - x11vnc-examples.diff - x11vnc-thread-auth.diff - x11vnc.desktop.generics - stack-check OBS-URL: https://build.opensuse.org/request/show/685933 OBS-URL: https://build.opensuse.org/package/show/X11:RemoteDesktop/x11vnc?expand=0&rev=34
51 lines
1.3 KiB
Diff
51 lines
1.3 KiB
Diff
diff --git a/src/screen.c b/src/screen.c
|
|
index 21e2eed..d5d42e4 100644
|
|
--- a/src/screen.c
|
|
+++ b/src/screen.c
|
|
@@ -4363,6 +4363,37 @@ if (0 && dt > 0.0) fprintf(stderr, "dt: %.5f %.4f\n", dt, dnowx());
|
|
return msec;
|
|
}
|
|
|
|
+/*
|
|
+ * Terrible hack for the multithreaded x11vnc ...
|
|
+ * But we get the client confused if we start sending stuff in our
|
|
+ * main loop prior to it being initialized properly. So wait.
|
|
+ * It's polling :-(
|
|
+ */
|
|
+static void _mt_wait_for_client() {
|
|
+ time_t start = time(0);
|
|
+ while (!client_count) {
|
|
+ if (first_conn_timeout && time(0) - start > first_conn_timeout)
|
|
+ return;
|
|
+ usleep(100*1000);
|
|
+ }
|
|
+ while (1) {
|
|
+ rfbClientIteratorPtr iter;
|
|
+ rfbClientPtr cl;
|
|
+ iter = rfbGetClientIterator(screen);
|
|
+ while( (cl = rfbClientIteratorNext(iter)) ) {
|
|
+ //ClientData *cd = (ClientData *) cl->clientData;
|
|
+ if (cl->state == RFB_NORMAL) {
|
|
+ rfbReleaseClientIterator(iter);
|
|
+ return;
|
|
+ }
|
|
+ }
|
|
+ rfbReleaseClientIterator(iter);
|
|
+ if (first_conn_timeout && time(0) - start > first_conn_timeout)
|
|
+ return;
|
|
+ usleep(100*1000);
|
|
+ }
|
|
+}
|
|
+
|
|
/*
|
|
* main x11vnc loop: polls, checks for events, iterate libvncserver, etc.
|
|
*/
|
|
@@ -4374,6 +4405,7 @@ void watch_loop(void) {
|
|
if (use_threads && !started_rfbRunEventLoop) {
|
|
started_rfbRunEventLoop = 1;
|
|
rfbRunEventLoop(screen, -1, TRUE);
|
|
+ _mt_wait_for_client();
|
|
}
|
|
|
|
while (1) {
|