From a07b3391ce978b1032eb715682f67749892b6996 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Mon, 11 Feb 2013 11:40:35 -0500 Subject: [PATCH] xfreerdp: fix XInitThreads() usage --- client/X11/xf_event.c | 2 ++ client/X11/xfreerdp.c | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/client/X11/xf_event.c b/client/X11/xf_event.c index f94de0289..d9f1840d5 100644 --- a/client/X11/xf_event.c +++ b/client/X11/xf_event.c @@ -969,5 +969,7 @@ BOOL xf_event_process(freerdp* instance, XEvent* event) break; } + XSync(xfi->display, FALSE); + return status; } diff --git a/client/X11/xfreerdp.c b/client/X11/xfreerdp.c index 5e08602ad..72a946f6f 100644 --- a/client/X11/xfreerdp.c +++ b/client/X11/xfreerdp.c @@ -667,7 +667,7 @@ BOOL xf_pre_connect(freerdp* instance) return TRUE; } - xfi->UseXThreads = FALSE; + xfi->UseXThreads = TRUE; if (xfi->UseXThreads) { @@ -1178,8 +1178,8 @@ void* xf_input_thread(void* arg) break; } - printf("Closed from X\n"); xfi->disconnect = TRUE; + printf("Closed from X\n"); return NULL; } @@ -1348,7 +1348,7 @@ int xfreerdp_run(freerdp* instance) timeout.tv_sec = 0; timeout.tv_usec = 100; - select_status = select(max_fds + 1, &rfds_set, &wfds_set, NULL, &timeout); + select_status = select(max_fds + 1, &rfds_set, &wfds_set, NULL, NULL); if (select_status == 0) {