unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: Eli Zaretskii <eliz@gnu.org>
Cc: npostavs@gmail.com, monnier@iro.umontreal.ca, emacs-devel@gnu.org
Subject: Re: "after" variable watchers
Date: Mon, 24 May 2021 10:48:29 +0200	[thread overview]
Message-ID: <263b9804-b1ce-5559-41a3-cdb930bb9223@gmx.at> (raw)
In-Reply-To: <83r1i1o6q1.fsf@gnu.org>

 >> There are too many implicit "realized" values to make this work nicely.
 >> Think of macros like WINDOW_BODY_PIXEL_WIDTH, WINDOW_BOX_LEFT_EDGE_X,
 >> WINDOW_BOX_RIGHT_EDGE_X, WINDOW_SCROLL_BAR_X or functions like
 >> window_box_height in addition to the things window_updeco_window sets
 >> directly.
 >
 > I don't think I understand this reasoning.  Changes in these values
 > are only visible as result of the next redisplay cycle, no?  So in
 > effect these values "wait" for the next redisplay anyway, right?

window_box_height or its moral equivalents like `window-inside-edges'
should be accessible before that, so a user or an application can make
layout decisions immediately after it has set a decoration.  Currently,
it can do that when invoking `set-window-fringes' or setting the
`left-fringe' parameter of the window's frame.  It cannot do that when
setting `left-fringe-width' of the window's buffer unless it also does a
`set-window-buffer' right away.

 >> Right.  But note that I implicitly call window_updeco_window also
 >> whenever I change a window's size, for example, from adjust_frame_size
 >> after a frame got resized.
 >
 > I think Stefan asks why do we need to do that.  Why not wait for when
 > these values are needed by redisplay, and calculate them only then?

If a specified value does not fit, we should be able react in different
ways:

- When an application asks for a window size that is not large enough to
   accommodate its decorations, we should be able to reject that request
   and signal an error.

- When the WM shrinks our frame so that a particular window is not large
   enough to include all of its decorations, we have to comply and do
   something reasonable to make that window display its contents orderly.

The display engine is not able to distinguish these cases.  And even if
it were, how should it react in the first case?

martin



  reply	other threads:[~2021-05-24  8:48 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-17  8:27 "after" variable watchers martin rudalics
2021-05-17 10:23 ` Eli Zaretskii
2021-05-17 16:40   ` martin rudalics
2021-05-17 16:57     ` Eli Zaretskii
2021-05-18 15:10       ` martin rudalics
2021-05-20 13:46         ` Eli Zaretskii
2021-05-24  8:47           ` martin rudalics
2021-05-27 16:51             ` Eli Zaretskii
2021-06-06  7:42               ` martin rudalics
2021-05-17 18:36     ` Stefan Monnier
2021-05-17 18:45       ` Eli Zaretskii
2021-05-17 18:54         ` Stefan Monnier
2021-05-17 18:55           ` Stefan Monnier
2021-05-18 15:10       ` martin rudalics
2021-05-18 15:57         ` Stefan Monnier
2021-05-18 17:01           ` martin rudalics
2021-05-20 13:49             ` Eli Zaretskii
2021-05-24  8:48               ` martin rudalics [this message]
2021-05-27 16:53                 ` Eli Zaretskii
2021-05-17 14:57 ` Matt Armstrong
2021-05-17 16:41   ` 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

  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=263b9804-b1ce-5559-41a3-cdb930bb9223@gmx.at \
    --to=rudalics@gmx.at \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=npostavs@gmail.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).