all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: "Gerd Möllmann" <gerd.moellmann@gmail.com>
Cc: Feng Shu <tumashu@163.com>, Emacs Devel <emacs-devel@gnu.org>
Subject: Re: Question about minibuffer and child frames (Posframe)
Date: Mon, 7 Oct 2024 15:44:29 +0200	[thread overview]
Message-ID: <cf090e99-e230-41f2-abcf-6100080e70dd@gmx.at> (raw)
In-Reply-To: <m28qv0z37x.fsf@gmail.com>

 >> So the parent pays?  If so, please say that somewhere because it will
 >> affect the position of the child frame within the parent.  On a GUI the
 >> position is the one specified by the user and the child frame pays for
 >> the border (is "affected").
 >
 > I don't know what you mean by "parent pays".

Whenever you show a border, it will obscure the part of the display that
would be otherwise shown instead.  So someone has to pay for that border
in terms of screen estate that is lost to that border.  For normal GUI
frames it usually doesn't matter - borders are narrow and the loser is
the desktop background.  Maximized and full screen frames usually don't
have a border, so there's no problem at all (IIRC maximized MS Windows
frames did have a border but it was drawn outside the screen).

So basically, these border spaces are payed for by the desktop and
possible other applications when frames overlap.  Some window managers
even make an invisible border around a frame which can be felt when a
user tries in vain to move a window to a position of (0, 0) on the
screen.

With Emacs the situation becomes more complicated because there are up
to three border types: One drawn by the window manager and our own ones
- the one specified by the border_width slot which is hardly ever seen
and the one specified by the internal_border_width slot (the
child_frame_border_width slot for child frames).

Now when you show a child frame on top of a normal frame you have two
ways to draw the internal borders:

(1) Keep the bounding rectangle of the child frame as specified.  In
     this case the child frame pays for the borders since it will have
     less space for showing its text.

(2) Enlarge the bounding rectangle of the child frame.  In this case the
     parent frame pays for the borders since it will have less space for
     showing its text.

On TTY frames drawing borders that are one character wide and high
inflicts the additional problem that in case (1) the size specified by
the application (maybe via 'fit-frame-to-buffer') is not met by what the
user sees.  In case (2) the position specified by the application may
not be met - the left edge of the child frame may overlap an interesting
part of the parent frame.

In addition, (2) may not be entirely easy to realize when the child
frame is positioned at an edge of the parent frame.

martin



  parent reply	other threads:[~2024-10-07 13:44 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-02 12:50 Question about minibuffer and child frames (Posframe) Gerd Möllmann
2024-10-02 13:39 ` Po Lu
2024-10-02 13:52   ` Gerd Möllmann
2024-10-02 14:56 ` martin rudalics
2024-10-02 15:47   ` Gerd Möllmann
2024-10-02 16:08     ` martin rudalics
2024-10-02 17:17       ` Gerd Möllmann
2024-10-02 17:34         ` martin rudalics
2024-10-02 18:48           ` Gerd Möllmann
2024-10-03  7:35             ` Gerd Möllmann
2024-10-03  8:26               ` martin rudalics
2024-10-03  9:07                 ` Gerd Möllmann
2024-10-03  9:33                   ` martin rudalics
2024-10-03  9:50                     ` Gerd Möllmann
2024-10-03 13:12                       ` martin rudalics
2024-10-03 14:03                         ` Gerd Möllmann
2024-10-04  7:24                           ` Gerd Möllmann
2024-10-04  8:10                             ` martin rudalics
2024-10-04  9:16                               ` Gerd Möllmann
2024-10-04  9:31                                 ` martin rudalics
2024-10-04  9:55                                   ` Gerd Möllmann
2024-10-05  8:31                                     ` Gerd Möllmann
2024-10-02 18:43         ` Eli Zaretskii
2024-10-02 18:56           ` Gerd Möllmann
2024-10-07  1:08 ` Feng Shu
2024-10-07  4:28   ` Gerd Möllmann
2024-10-07  6:43     ` Feng Shu
2024-10-07  8:00       ` Gerd Möllmann
2024-10-07  8:17         ` Feng Shu
2024-10-07  8:32           ` Gerd Möllmann
2024-10-07 10:03             ` Feng Shu
2024-10-07 10:46               ` Gerd Möllmann
2024-10-07 13:44                 ` martin rudalics
2024-10-07 14:29                   ` Gerd Möllmann
2024-10-07 21:45                     ` Feng Shu
2024-10-08  4:19                       ` Gerd Möllmann
2024-10-08  5:01                         ` Gerd Möllmann
2024-10-08  5:42                           ` Feng Shu
2024-10-08  6:31                             ` Gerd Möllmann
2024-10-08 13:06                           ` Gerd Möllmann
2024-10-07  8:35         ` martin rudalics
2024-10-07  8:46           ` Gerd Möllmann
2024-10-07  8:52             ` martin rudalics
2024-10-07  9:12               ` Gerd Möllmann
2024-10-07 10:11                 ` Feng Shu
2024-10-07 10:36                   ` Gerd Möllmann
2024-10-07 12:12                     ` Feng Shu
2024-10-07 12:24                       ` Gerd Möllmann
2024-10-07 13:44                 ` martin rudalics [this message]
2024-10-07 14:24                   ` Gerd Möllmann
2024-10-07  8:35       ` martin rudalics
2024-10-07  9:46         ` Feng Shu
2024-10-07  7:20     ` Feng Shu
2024-10-07  8:12       ` Gerd Möllmann
2024-10-11  8:03         ` Gerd Möllmann
2024-10-07  8:34   ` martin rudalics
2024-10-07  9:35     ` Feng Shu

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=cf090e99-e230-41f2-abcf-6100080e70dd@gmx.at \
    --to=rudalics@gmx.at \
    --cc=emacs-devel@gnu.org \
    --cc=gerd.moellmann@gmail.com \
    --cc=tumashu@163.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 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.