Subject: bug#44180: 28.0.50; Emacs frames won't redisplay unless resized

From: Eli Zaretskii <[email-masked]>
Date: Tue, 27 Oct 2020 20:45:58 +0200

> From: Eric Abrahamsen <[email-masked]>
> Cc: Eli Zaretskii <[email-masked]>,  [email-masked]
> Date: Tue, 27 Oct 2020 11:11:26 -0700
> 
> I think I'm going to need more help here, though. I have built master
> with optimizations off, I start GDB in a controlling emacs, set a
> breakpoint at xdisp.c:34381 at the beginning of expose_frame, and then
> "run -Q".
> 
> That pops up a new frame, and we hit the breakpoint.

That's the initial frame, isn't it?  If so, this is not the frame we
want, we want a frame that was obscured and then gets the focus.

To save yourself from a lot of unwanted breakpoint hits, I suggest
this paradigm:

 $ gdb ./emacs
 (gdb) break Frecenter
 (gdb) r -Q

Inside Emacs:

  M-x blink-cursor-mode RET
  M-x global-eldoc-mode RET

Now create one or more other frames and make them obscured
("iconified").  Now type C-l -- this will hit the breakpoint in
Frecenter, and GDB will kick in.  Then set a breakpoint in
expose_frame and type "continue".  Finally, switch to a frame that was
obscured: does the breakpoint in expose_frame break, and if so, is
Emacs told to expose the correct frame, the one that was obscured and
is going to become visible?  If it's the correct frame, show the
backtrace.

Then do all this again, but after reverting the change which causes
the problem.  By comparing the backtraces and the behavior, we might
begin to understand how this change causes the problem in your case.

Thanks.