unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: martin rudalics <rudalics@gmx.at>
Cc: occitan@esperanto.org, 12419@debbugs.gnu.org
Subject: bug#12419: Mouse click changes layout
Date: Wed, 26 Sep 2012 15:17:06 +0200	[thread overview]
Message-ID: <838vbwhqjx.fsf@gnu.org> (raw)
In-Reply-To: <5062F86A.4060502@gmx.at>

> Date: Wed, 26 Sep 2012 14:43:22 +0200
> From: martin rudalics <rudalics@gmx.at>
> CC: occitan@esperanto.org, 12419@debbugs.gnu.org
> 
>  > Sorry, I don't understand what you mean by "drawing over a previous
>  > column/row".  Which "previous" column/row are we talking about?
> 
> For example, when we draw the mode-line of a window: Do we first clip
> the glyphs on the bottom of the last proper line of the window or do we
> draw them unclipped and afterwards draw the mode-line on top of it so it
> obscures the lower part of the window line?

It's the other way around: first the window is cleared, then we draw
the mode line, and only then the window text.  So the last line is
already drawn only partially to begin with (I believe this is done by
the display back-end, in *term.c, by clipping the drawn glyphs to the
dimensions of the text area, but I'm not an expert on these back-ends).

>  >> Consider a two window frame, the upper window has 5 lines the lower
>  >> window has 6 lines but in fact both are shown with 5.5 lines.
>  >
>  > Can't happen: a window that displays 5.5 lines must have 6 lines, or
>  > else the glyphs for the last half-line will have no place in the glyph
>  > matrix.
> 
> Let's say the TTY equivalent of the upper window would display 5 lines.

And the lower one 6, OK.

>  >> Now I
>  >> enlarge the upper window by one line.  Currently this makes a 6 to 5
>  >> lines frame.  Would it make a 6.5 to 4.5 frame with the new code or a 6
>  >> to 5 lines frame?
>  >
>  > It's up to us.  The easiest (and also the least surprising, IMO) would
>  > be to resize from (5.5, 5.5) to (6.5, 4.5), i.e. by one full line.
> 
> In this case the TTY equivalent would display (6, 5) lines.

Yes.  Is that a problem?  pos-visible-in-window-p can still tell
whether the resize reached its goal of exposing the text you want, no?

>  >> For implementing something like `count-screen-lines-to-pixels' and get
>  >> rid of that crazy loop where we calculate `pos-visible-in-window-p' and
>  >> resize the window.
>  >
>  > I think pos-visible-in-window-p is what you need.
> 
> Currently it loops calling `pos-visible-in-window-p' until the position
> is visible.  How avoid that loop?

I think the loop isn't needed for the application you have in mind.
But if it is, can you show a concrete use case where just using that
function gives bad results for measuring pixel distance between buffer
positions?





  reply	other threads:[~2012-09-26 13:17 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-11 22:04 bug#12419: Mouse click changes layout Daniel Pfeiffer
2012-09-12  2:59 ` Eli Zaretskii
2012-09-12  8:09 ` martin rudalics
2012-09-13 20:41   ` Daniel Pfeiffer
2012-09-14  9:00     ` martin rudalics
2012-09-14 10:36       ` Eli Zaretskii
2012-09-14 13:38         ` martin rudalics
2012-09-14 14:10           ` Drew Adams
2012-09-14 15:08             ` martin rudalics
2012-09-14 16:18               ` Drew Adams
2012-09-14 19:14                 ` martin rudalics
2012-09-14 19:40                   ` Drew Adams
2012-09-15  9:51                     ` martin rudalics
2012-09-15 10:31                       ` martin rudalics
2012-09-14 14:53           ` Eli Zaretskii
2012-09-14 15:16             ` martin rudalics
2012-09-14 16:20               ` Drew Adams
2012-09-14 19:14                 ` martin rudalics
2012-09-14 16:56               ` Eli Zaretskii
2012-09-14 19:15                 ` martin rudalics
2012-09-14 20:16                   ` Eli Zaretskii
2012-09-15  9:54                     ` martin rudalics
2012-09-15 10:23                       ` Eli Zaretskii
2012-09-15 10:39                         ` martin rudalics
2012-09-15 11:14                           ` Eli Zaretskii
2012-09-15 12:44                             ` martin rudalics
2012-09-15 13:35                               ` Eli Zaretskii
2012-09-15 14:34                                 ` martin rudalics
2012-09-14 15:45             ` Stefan Monnier
2012-09-14 19:14               ` martin rudalics
2012-09-14 19:56                 ` Stefan Monnier
2012-09-15  9:51                   ` martin rudalics
     [not found]       ` <5055D769.1060804@t-online.de>
2012-09-16 17:45         ` martin rudalics
2012-09-22 20:29           ` Daniel Pfeiffer
2012-09-23  9:21             ` martin rudalics
2012-09-23 21:56               ` Daniel Pfeiffer
2012-09-24  8:17                 ` martin rudalics
2012-09-24 14:33                   ` Eli Zaretskii
2012-09-25  9:58                     ` martin rudalics
2012-09-25 12:09                       ` Eli Zaretskii
2012-09-25 14:12                         ` martin rudalics
2012-09-26  8:22                           ` Eli Zaretskii
2012-09-26 11:03                             ` martin rudalics
2012-09-26 11:55                               ` Eli Zaretskii
2012-09-26 12:43                                 ` martin rudalics
2012-09-26 13:17                                   ` Eli Zaretskii [this message]
2012-09-26 13:44                                     ` martin rudalics
2012-09-26 13:57                                       ` Eli Zaretskii
2012-09-24 22:20                   ` Daniel Pfeiffer
2012-09-25  6:32                     ` Eli Zaretskii
2012-09-25  9:58                     ` martin rudalics
2020-09-13 17:06               ` Lars Ingebrigtsen
2020-12-07 16:43                 ` Lars Ingebrigtsen

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=838vbwhqjx.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=12419@debbugs.gnu.org \
    --cc=occitan@esperanto.org \
    --cc=rudalics@gmx.at \
    /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).