aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKaroly Lorentey2005-12-12 03:15:52 +0000
committerKaroly Lorentey2005-12-12 03:15:52 +0000
commit5f6a587f307d47878dfa44058c613fefab4ecac3 (patch)
tree0e01b9c4d14238d1d8af843268ded8d9dba7e426 /src
parentd68058039e1ff5635b2e44509fc242de4f0a286f (diff)
downloademacs-5f6a587f307d47878dfa44058c613fefab4ecac3.tar.gz
emacs-5f6a587f307d47878dfa44058c613fefab4ecac3.zip
Prevent core dumps with GTK by disabling secondary X connections there.
* src/xterm.c (x_term_init) [!HAVE_GTK_MULTIDISPLAY]: Refuse to create secondary X connections. * configure.in (HAVE_GTK_MULTIDISPLAY): Disable test, unconditionally undefine. * configure: Regenerate. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-450
Diffstat (limited to 'src')
-rw-r--r--src/xterm.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 42c860b64c9..cf0c8176dd5 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -10141,14 +10141,26 @@ x_term_init (display_name, xrm_option, resource_name)
10141 char **argv2 = argv; 10141 char **argv2 = argv;
10142 GdkAtom atom; 10142 GdkAtom atom;
10143 10143
10144#ifndef HAVE_GTK_MULTIDISPLAY
10145 if (!EQ (Vinitial_window_system, intern ("x")))
10146 error ("Sorry, you cannot connect to X servers with the GTK toolkit");
10147#endif
10148
10144 if (x_initialized++ > 1) 10149 if (x_initialized++ > 1)
10145 { 10150 {
10151#ifdef HAVE_GTK_MULTIDISPLAY
10146 /* Opening another display. If xg_display_open returns less 10152 /* Opening another display. If xg_display_open returns less
10147 than zero, we are probably on GTK 2.0, which can only handle 10153 than zero, we are probably on GTK 2.0, which can only handle
10148 one display. GTK 2.2 or later can handle more than one. */ 10154 one display. GTK 2.2 or later can handle more than one. */
10149 if (xg_display_open (SDATA (display_name), &dpy) < 0) 10155 if (xg_display_open (SDATA (display_name), &dpy) < 0)
10150 error ("Sorry, this version of GTK can only handle one display"); 10156 error ("Sorry, this version of GTK can only handle one display");
10151 } 10157#else
10158 /* XXX Unfortunately, multiple display support is severely broken
10159 in recent GTK versions, so HAVE_GTK_MULTIDISPLAY is
10160 unconditionally disabled in configure.in. */
10161 error ("Sorry, multiple display support is broken in current GTK versions");
10162#endif
10163 }
10152 else 10164 else
10153 { 10165 {
10154 for (argc = 0; argc < NUM_ARGV; ++argc) 10166 for (argc = 0; argc < NUM_ARGV; ++argc)