[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#19175: 24.4; make-frame-on-display fails if emacs started with -nw
From: |
Eli Zaretskii |
Subject: |
bug#19175: 24.4; make-frame-on-display fails if emacs started with -nw |
Date: |
Sun, 29 Mar 2015 20:20:43 +0300 |
> Date: Sun, 29 Mar 2015 19:09:48 +0200
> From: Jan Djärv <jan.h.d@swipnet.se>
> CC: mb@becroft.co.nz, 19175@debbugs.gnu.org
>
> index fedaa0f..1f48262 100644
> --- a/src/gtkutil.c
> +++ b/src/gtkutil.c
> @@ -167,7 +167,9 @@ xg_display_open (char *display_name, Display **dpy)
> {
> GdkDisplay *gdpy;
>
> + unrequest_sigio ();
> gdpy = gdk_display_open (display_name);
> + request_sigio ();
> if (!gdpy_def && gdpy)
> {
> gdpy_def = gdpy;
> diff --git a/src/xterm.c b/src/xterm.c
> index 4ca1e13..8284ed9 100644
> --- a/src/xterm.c
> +++ b/src/xterm.c
> @@ -9719,7 +9719,10 @@ get_bits_and_offset (unsigned long mask, int *bits,
> int
> *offset)
> bool
> x_display_ok (const char *display)
> {
> - Display *dpy = XOpenDisplay (display);
> + Display *dpy;
> + unrequest_sigio ();
> + dpy = XOpenDisplay (display);
> + request_sigio ();
> return dpy ? (XCloseDisplay (dpy), 1) : 0;
> }
>
> @@ -9811,7 +9814,9 @@ x_term_init (Lisp_Object display_name, char
> *xrm_option,
> char *resource_name)
>
> /* gtk_init does set_locale. Fix locale before and after. */
> fixup_locale ();
> + unrequest_sigio ();
> gtk_init (&argc, &argv2);
> + request_sigio ();
> fixup_locale ();
>
> g_log_remove_handler ("GLib", id);
> @@ -9861,10 +9866,12 @@ x_term_init (Lisp_Object display_name, char
> *xrm_option, char *resource_name)
> argv[argc++] = xrm_option;
> }
> turn_on_atimers (0);
> + unrequest_sigio ();
> dpy = XtOpenDisplay (Xt_app_con, SSDATA (display_name),
> resource_name, EMACS_CLASS,
> emacs_options, XtNumber (emacs_options),
> &argc, argv);
> + request_sigio ();
> turn_on_atimers (1);
>
> #ifdef HAVE_X11XTR6
> @@ -9875,7 +9882,9 @@ x_term_init (Lisp_Object display_name, char
> *xrm_option,
> char *resource_name)
>
> #else /* not USE_X_TOOLKIT */
> XSetLocaleModifiers ("");
> + unrequest_sigio ();
> dpy = XOpenDisplay (SSDATA (display_name));
> + request_sigio ();
> #endif /* not USE_X_TOOLKIT */
> #endif /* not USE_GTK*/
Thanks, this looks safe enough to me. Just add some comments to
explain the need.
I hope Nicolas won't mind preparing a new tarball for the release.
- bug#19175: 24.4; make-frame-on-display fails if emacs started with -nw, Jan D., 2015/03/23
- bug#19175: 24.4; make-frame-on-display fails if emacs started with -nw, Mario Becroft, 2015/03/23
- bug#19175: 24.4; make-frame-on-display fails if emacs started with -nw, Glenn Morris, 2015/03/23
- bug#19175: 24.4; make-frame-on-display fails if emacs started with -nw, Mario Becroft, 2015/03/28
- bug#19175: 24.4; make-frame-on-display fails if emacs started with -nw, Jan D., 2015/03/29
- bug#19175: 24.4; make-frame-on-display fails if emacs started with -nw, Mario Becroft, 2015/03/29
- bug#19175: 24.4; make-frame-on-display fails if emacs started with -nw, Eli Zaretskii, 2015/03/29
- bug#19175: 24.4; make-frame-on-display fails if emacs started with -nw, Jan Djärv, 2015/03/29
- bug#19175: 24.4; make-frame-on-display fails if emacs started with -nw,
Eli Zaretskii <=
- bug#19175: 24.4; make-frame-on-display fails if emacs started with -nw, Jan D., 2015/03/29
- bug#19175: 24.4; make-frame-on-display fails if emacs started with -nw, Stefan Monnier, 2015/03/29
- bug#19175: 24.4; make-frame-on-display fails if emacs started with -nw, Jan D., 2015/03/30
- bug#19175: 24.4; make-frame-on-display fails if emacs started with -nw, Stefan Monnier, 2015/03/30
- bug#19175: 24.4; make-frame-on-display fails if emacs started with -nw, Eli Zaretskii, 2015/03/30
- bug#19175: 24.4; make-frame-on-display fails if emacs started with -nw, Stefan Monnier, 2015/03/30
- bug#19175: 24.4; make-frame-on-display fails if emacs started with -nw, Eli Zaretskii, 2015/03/30
- bug#19175: 24.4; make-frame-on-display fails if emacs started with -nw, Stefan Monnier, 2015/03/31
- bug#19175: 24.4; make-frame-on-display fails if emacs started with -nw, Eli Zaretskii, 2015/03/31
- bug#19175: 24.4; make-frame-on-display fails if emacs started with -nw, Stefan Monnier, 2015/03/31