[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master b023994 1/3: Initialize thread support for Xlib.
From: |
Ken Raeburn |
Subject: |
[Emacs-diffs] master b023994 1/3: Initialize thread support for Xlib. |
Date: |
Fri, 30 Dec 2016 23:02:57 +0000 (UTC) |
branch: master
commit b0239945a36dafae908259a9a29c2a166ff53cee
Author: Ken Raeburn <address@hidden>
Commit: Ken Raeburn <address@hidden>
Initialize thread support for Xlib.
* src/xterm.c (x_initialize) [THREADS_ENABLED]: Call XInitThreads
before doing anything else with X.
---
src/xterm.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/xterm.c b/src/xterm.c
index bdc21e6..67bd13a 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -12762,6 +12762,13 @@ x_initialize (void)
/* Try to use interrupt input; if we can't, then start polling. */
Fset_input_interrupt_mode (Qt);
+#if THREADS_ENABLED
+ /* This must be called before any other Xlib routines. */
+ if (XInitThreads () == 0)
+ fprintf (stderr,
+ "Warning: An error occurred initializing X11 thread support!\n");
+#endif
+
#ifdef USE_X_TOOLKIT
XtToolkitInitialize ();