unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: David Fussner <dfussner@googlemail.com>, 44794@debbugs.gnu.org
Subject: bug#44794: 28.0.50; Frame creation broken with (tool-bar-mode -1)
Date: Sun, 22 Nov 2020 07:20:09 -0800	[thread overview]
Message-ID: <CADwFkmmEZ2cj+_c85aqocGsG48B954g5mB1yNjBPQ0PDveiQWg@mail.gmail.com> (raw)
In-Reply-To: <CADF+Rtj=6czj0PEnRs3b6TmHmDzV47j3QH64CB0KgOQRjU0eKA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1309 bytes --]

David Fussner via "Bug reports for GNU Emacs, the Swiss army knife of
text editors" <bug-gnu-emacs@gnu.org> writes:

> With a .emacs file containing only the line:
>
> (tool-bar-mode -1)
>
> Then ./emacs in the repo src directory.
>
> On my system, the initial frame is blank except for a title bar, menu
> bar and a scroll bar -- no mini-buffer and nothing at all in the main
> window. If you resize the frame with the mouse or by keyboard shortcut
> then the usual splash screen appears, along with the mini-buffer. The
> symptoms differ somewhat if you add font specifications and/or frame
> size specifications to the .emacs file, but it still doesn't work
> right.
>
> I bisected it to commit 36431e1679, which modifies xterm.c. Reverting
> that commit and rebuilding brings back the previous behavior, and all
> looks correct to me.

Thank you for bisecting and the clear recipe.  This points at a recent
and fairly trivial patch by me, but I unfortunately can't reproduce the
issue here.

There is something subtle going on here that I don't understand.  Does
anyone else have an idea?

This might be a long-shot, but could you please try the attached patch
to see if it works better?  It's the best I could come up with; if it
doesn't work, I think someone else will have to help figure this one
out.

[-- Attachment #2: bug-44794-sk.patch --]
[-- Type: text/x-diff, Size: 1257 bytes --]

diff --git a/src/xterm.c b/src/xterm.c
index 0d2452de92..05353a2ec2 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -12927,24 +12927,19 @@ #define NUM_ARGV 10
   XSetAfterFunction (x_current_display, x_trace_wire);
 #endif
 
-  Lisp_Object system_name = Fsystem_name ();
   static char const title[] = "GNU Emacs";
+  static char const at[] = " at ";
+  Lisp_Object system_name = Fsystem_name ();
+  ptrdiff_t nbytes = sizeof (title) + sizeof (at);
+  if (STRINGP (system_name)
+      && INT_ADD_WRAPV (nbytes, SBYTES (system_name) + 1, &nbytes))
+    memory_full (SIZE_MAX);
+  dpyinfo->x_id = ++x_display_id;
+  dpyinfo->x_id_name = xmalloc (nbytes);
   if (STRINGP (system_name))
-    {
-      static char const at[] = " at ";
-      ptrdiff_t nbytes = sizeof (title) + sizeof (at);
-      if (INT_ADD_WRAPV (nbytes, SBYTES (system_name), &nbytes))
-	memory_full (SIZE_MAX);
-      dpyinfo->x_id_name = xmalloc (nbytes);
       sprintf (dpyinfo->x_id_name, "%s%s%s", title, at, SDATA (system_name));
-    }
   else
-    {
-      dpyinfo->x_id_name = xmalloc (sizeof (title));
       strcpy (dpyinfo->x_id_name, title);
-    }
-
-  dpyinfo->x_id = ++x_display_id;
 
   /* Figure out which modifier bits mean what.  */
   x_find_modifier_meanings (dpyinfo);

  parent reply	other threads:[~2020-11-22 15:20 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-22 12:46 bug#44794: 28.0.50; Frame creation broken with (tool-bar-mode -1) David Fussner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-11-22 13:43 ` David Fussner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-11-22 15:20 ` Stefan Kangas [this message]
2020-11-22 15:49   ` Eli Zaretskii
2020-11-22 18:08     ` David Fussner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-11-22 18:39       ` Eli Zaretskii
2020-11-22 18:54         ` David Fussner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-11-22 19:16           ` Stefan Kangas
2020-11-22 19:23             ` David Fussner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-11-22 19:59               ` Eli Zaretskii
2020-11-22 20:50                 ` David Fussner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-11-22 21:47                   ` David Fussner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-12-13 18:17                     ` David Fussner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-12-13 18:53                       ` Eli Zaretskii
2020-12-13 21:22                         ` David Fussner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-12-19 10:42                           ` Eli Zaretskii
2020-12-19 13:07                             ` martin rudalics
2020-12-19 13:22                               ` Eli Zaretskii
2020-12-19 15:55                                 ` martin rudalics
2020-12-19 18:19                                   ` David Fussner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-12-19 18:31                                     ` Eli Zaretskii
2020-12-21 14:42                                   ` J. Scott Berg
2020-12-21 15:33                                     ` martin rudalics
2020-12-21 17:29                                     ` Eli Zaretskii
2020-11-22 19:37           ` Eli Zaretskii

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADwFkmmEZ2cj+_c85aqocGsG48B954g5mB1yNjBPQ0PDveiQWg@mail.gmail.com \
    --to=stefan@marxist.se \
    --cc=44794@debbugs.gnu.org \
    --cc=dfussner@googlemail.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).