unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Cc: emacs-devel@gnu.org
Subject: Re: The display margin
Date: 24 Nov 2003 10:52:21 +0100	[thread overview]
Message-ID: <m3u14uqeju.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <x5znemznkd.fsf@lola.goethe.zz>

David Kastrup <dak@gnu.org> writes:

> Nick Roberts <nick@nick.uklinux.net> writes:
> 
> >  > I have just checked in fixes to improve event handling for mouse
> >  > clicks in the marginal areas and on the fringes.  Events now have
> >  > additional information:
> >  > 
> >  >    (WINDOW AREA-OR-POS (X . Y) TIMESTAMP OBJECT POS (COL . ROW))
> >  > 
> >  > AREA-OR-POS is not changed as such -- but it may now contain
> >  > left-fringe and right-fringe.
> >  > 
> >  > For clicks in the text area, POS is the same as AREA-OR-POS (the
> >  > buffer position clicked on).  For clicks in other areas, POS is
> >  > the buffer position of the first visible glyph on the
> >  > corresponding row.
> >  > 
> >  > As an example, try M-x gdba and click mouse-1 on the left margin
> >  > or fringe of a source window [it should toggle breakpoint on that
> >  > line].
> > 
> > Kim,
> > 
> > I like this very much.
> 
> The click information for GNU Emacs is quite insufficient, anyway.
> XEmacs, as far as I can remember, can tell from an event what object
> has been clicked on and what pixel relative to the object's origin
> has been hit.  With GNU Emacs, in contrast, you have to set up a
> separate keymap for every object in order to have a chance to find
> out which of several ones have been clicked, and no chance of finding
> the relative position at all.

The OBJECT part of an event (retrievable with the new posn-object
function) will give you the object clicked on, that is, if the object
you click on is an overlay string or display property string or image,
then the string and a character position in that string is returned.

I agree that for images, a relative pixel coordiante would be useful too;
I'll look into that.

> 
> And the object/click correlation is done at the time when you query
> the event, not when the click was done: if you click in order to do a
> cut&paste operation on some buffer, and Emacs churns away internally
> at the time, finally places a dialog box "Explode now?" on the
> screen, then finally processes the click event, it will associate at
> it with the exploding object instead of what was on the screen at the
> time of the click.

Yes, that may be true -- mouse events are put into the normal input
queue, so if there are other events (like async process i/o) going on
before emacs processes the input queue, it may hit the wrong object
before it gets a change to process it.

But I don't quite follow the line of thought above; emacs must have
processed the mouse event if it displays an "Explode now?" dialog box;
and as such, it must have a handle to the clicked-on object prior to
showing that dialog box.  Can you show me a piece of code which
demonstrates the problem?

> 
> I digress.  Anyway, I want more information from clicks.  At the
> very least, the object they appeared on.

Doesn't this work with my latest changes?

++kfs

  reply	other threads:[~2003-11-24  9:52 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-25 16:22 The display margin Nick Roberts
2003-05-25 16:36 ` Stefan Monnier
2003-05-26 23:42   ` Nick Roberts
2003-11-23  2:08     ` Kim F. Storm
2003-11-23 22:53       ` Nick Roberts
2003-11-23 23:12         ` David Kastrup
2003-11-24  9:52           ` Kim F. Storm [this message]
2003-11-24 15:33             ` Kim F. Storm
2003-11-27 23:08           ` Kim F. Storm
2003-11-27 22:30             ` David Kastrup
2003-11-27 23:17               ` Stefan Monnier
2003-11-28 11:09               ` Kim F. Storm
2003-11-28 10:53                 ` David Kastrup
2003-11-28 14:23                   ` Thien-Thi Nguyen
2003-11-28 16:02                     ` David Kastrup
2003-11-28 17:01                       ` Thien-Thi Nguyen
2003-11-29  3:15                   ` Kim F. Storm
2003-11-29 11:37                     ` David Kastrup
2003-12-01 10:15                       ` Kim F. Storm
2003-12-01 13:08                         ` David Kastrup
2003-12-28  1:43                           ` Kim F. Storm
2003-12-29 11:54                             ` Richard Stallman
2003-11-24  0:09         ` Kim F. Storm
2003-11-25 21:11           ` Nick Roberts
2003-11-25 22:42             ` Kim F. Storm
  -- strict thread matches above, loose matches on Subject: below --
2003-11-28 12:47 David PONCE

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=m3u14uqeju.fsf@kfs-l.imdomain.dk \
    --to=storm@cua.dk \
    --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 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).