all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Eli Zaretskii <eliz@gnu.org>
Cc: dmantipov@yandex.ru, emacs-devel@gnu.org
Subject: Re: 8af8355c3f72500986f6f10b62714b228d6f35ee breaks minibuffer echo with Lucid
Date: Wed, 07 Oct 2015 11:47:46 +0200	[thread overview]
Message-ID: <5614EA42.9010308@gmx.at> (raw)
In-Reply-To: <56140AE1.2010502@gmx.at>

 > We always do that whenever setting a frame parameter can change any of
 > the frame's dimensions.  Here for some mysterious reason the top line of
 > the minibuffer is not set up correctly in resize_frame_windows.  I'm yet
 > too silly to find out why.

It was a silly bug.  A more intuitive recipe to reproduce it was

(progn (split-window) (tool-bar-mode 0) (scroll-bar-mode -1))

The old code contained this logic: adjust_frame_size calls
resize_frame_windows a first time when

      (new_windows_width != old_windows_width)

and a second time when

      (new_windows_height != old_windows_height
       /* When the top margin has changed we have to recalculate the top
	 edges of all windows.  No such calculation is necessary for the
	 left edges.  */
       || WINDOW_TOP_PIXEL_EDGE (r) != FRAME_TOP_MARGIN_HEIGHT (f))

But the old resize_frame_windows code _unconditionally_ set

   r->top_line = FRAME_TOP_MARGIN (f);
   r->pixel_top = FRAME_TOP_MARGIN_HEIGHT (f);

As a consequence, the first call of resize_frame_windows (the one
assigning new widths to windows) did set the top pixel edge of the
frame's root window to the new value of the frame's top margin (the one
after removing the tool bar).  The second call of resize_frame_windows
(the one assigning the new height values) was not executed because
adjust_frame_size decided that (1) the overall height of the frame's
windows did not change (which is obvious when removing scroll bars but
also when removing the tool bar while a frame is created) and (2) the
top pixel edge of the root window already had the right value.

martin



  reply	other threads:[~2015-10-07  9:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-06  9:32 8af8355c3f72500986f6f10b62714b228d6f35ee breaks minibuffer echo with Lucid Dmitry Antipov
2015-10-06 10:20 ` martin rudalics
2015-10-06 14:50   ` Eli Zaretskii
2015-10-06 17:54     ` martin rudalics
2015-10-07  9:47       ` martin rudalics [this message]
2015-10-07  9:47 ` martin rudalics

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=5614EA42.9010308@gmx.at \
    --to=rudalics@gmx.at \
    --cc=dmantipov@yandex.ru \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    /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.