From: "Jan D." <jan.h.d@swipnet.se>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Mario Becroft <mb@becroft.co.nz>, 19175-done@debbugs.gnu.org
Subject: bug#19175: 24.4; make-frame-on-display fails if emacs started with -nw
Date: Sun, 29 Mar 2015 21:18:06 +0200 [thread overview]
Message-ID: <5B364DE3-7FCC-415D-9AA9-CF96107BD44F@swipnet.se> (raw)
In-Reply-To: <83iodjzpn8.fsf@gnu.org>
Fixed in the emacs-24 branch.
Jan D.
> 29 mar 2015 kl. 19:20 skrev Eli Zaretskii <eliz@gnu.org>:
>
>> 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.
next prev parent reply other threads:[~2015-03-29 19:18 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-25 4:28 bug#19175: 24.4; make-frame-on-display fails if emacs started with -nw Mario Becroft
2014-11-25 4:34 ` bug#19175: Further information Mario Becroft
2015-03-23 6:12 ` bug#19175: 24.4; make-frame-on-display fails if emacs started with -nw Jan D.
2015-03-23 6:32 ` Mario Becroft
2015-03-23 17:34 ` Glenn Morris
2015-03-23 20:26 ` Mario Becroft
2015-03-24 1:44 ` Glenn Morris
2015-03-29 3:42 ` Mario Becroft
2015-03-29 8:45 ` Jan D.
2015-03-29 8:52 ` Mario Becroft
2015-03-29 15:01 ` Eli Zaretskii
2015-03-29 17:09 ` Jan Djärv
2015-03-29 17:20 ` Eli Zaretskii
2015-03-29 19:18 ` Jan D. [this message]
2015-03-29 21:17 ` Stefan Monnier
2015-03-30 6:32 ` Jan D.
2015-03-30 13:58 ` Stefan Monnier
2015-03-30 14:36 ` Eli Zaretskii
2015-03-30 20:51 ` Stefan Monnier
2015-03-31 2:34 ` Eli Zaretskii
2015-03-31 13:26 ` Stefan Monnier
2015-03-31 14:03 ` Eli Zaretskii
2015-03-31 21:07 ` Stefan Monnier
2015-04-01 2:38 ` Eli Zaretskii
2015-04-01 3:55 ` Stefan Monnier
2015-03-30 14:47 ` Eli Zaretskii
2015-03-31 14:14 ` Nicolas Petton
2015-03-31 21:08 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5B364DE3-7FCC-415D-9AA9-CF96107BD44F@swipnet.se \
--to=jan.h.d@swipnet.se \
--cc=19175-done@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=mb@becroft.co.nz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.