Mercurial > emacs
comparison src/xterm.c @ 83410:fea405284011
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
author | Karoly Lorentey <lorentey@elte.hu> |
---|---|
date | Mon, 12 Dec 2005 03:15:52 +0000 |
parents | 03934708f1e9 |
children | fe870a866ce7 |
comparison
equal
deleted
inserted
replaced
83409:be1f74bffc1d | 83410:fea405284011 |
---|---|
10139 int argc; | 10139 int argc; |
10140 char *argv[NUM_ARGV]; | 10140 char *argv[NUM_ARGV]; |
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) |
10155 argv[argc] = 0; | 10167 argv[argc] = 0; |
10156 | 10168 |