GNU bug report logs -
#24642
26.0.50; Missing mode-line on initial frame
Previous Next
Reported by: martin rudalics <rudalics <at> gmx.at>
Date: Sat, 8 Oct 2016 16:18:01 UTC
Severity: normal
Found in version 26.0.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 24642 <at> debbugs.gnu.org (full text, mbox):
> Date: Sat, 08 Oct 2016 18:17:29 +0200
> From: martin rudalics <rudalics <at> gmx.at>
>
> With the following file missing-mode-line.el
>
>
> (defvar old (selected-frame))
> (defvar new (make-frame '((minibuffer . nil))))
>
> (set-frame-width new 1640 nil t)
> (set-frame-width old 400 nil t)
> (set-frame-position new 0 0)
> (set-frame-position old -1 -40)
>
>
> and
>
> emacs -Q -load "~/missing-mode-line.el"
>
> I get on Windows XP two frames where the root window of the smaller one
> has a missing mode-line. The mode-line reappears when that frame gets
> focus. It's a minor issue but cannot be reproduced here with Emacs 25.
>
> It's easily possible that I introduced the bug myself but I don't recall
> changing anything in this area. So if this rings a bell ...
Sorry for a late response.
In fact, not just the mode line was missing, but the entire frame
contents was not displayed, just an empty frame.
No bells rang here, but the patch below solves this for me. Does it
make sense? (Don't ask me how it works on emacs-25, it looks like
some lucky coincidence with timing of the WM_PAINT message and the way
we set windows_or_buffers_changed.)
diff --git a/src/w32term.c b/src/w32term.c
index e8d66c9..ae0f741 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -4628,11 +4628,18 @@ w32_read_socket (struct terminal *terminal,
}
else
{
- HDC hdc = get_frame_dc (f);
+ /* Erase background again for safety. But don't do
+ that if the frame's 'garbaged' flag is set, since
+ in that case expose_frame will do nothing, and if
+ the various redisplay flags happen to be unset,
+ we are left with a blank frame. */
+ if (!FRAME_GARBAGED_P (f))
+ {
+ HDC hdc = get_frame_dc (f);
- /* Erase background again for safety. */
- w32_clear_rect (f, hdc, &msg.rect);
- release_frame_dc (f, hdc);
+ w32_clear_rect (f, hdc, &msg.rect);
+ release_frame_dc (f, hdc);
+ }
expose_frame (f,
msg.rect.left,
msg.rect.top,
diff --git a/src/xdisp.c b/src/xdisp.c
index c045ced..1420a4a 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -14116,6 +14116,7 @@ redisplay_internal (void)
if (f->updated_p)
{
f->redisplay = false;
+ f->garbaged = false;
mark_window_display_accurate (f->root_window, true);
if (FRAME_TERMINAL (f)->frame_up_to_date_hook)
FRAME_TERMINAL (f)->frame_up_to_date_hook (f);
This bug report was last modified 8 years and 239 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.