all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: storm@cua.dk (Kim F. Storm)
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: Re: Toolbar redraw causes unwanted selection
Date: Sat, 30 Dec 2006 00:38:56 +0100	[thread overview]
Message-ID: <m3zm969srz.fsf@kfs-l.imdomain.dk> (raw)
In-Reply-To: <DCBB437C-18B2-4A9D-86CA-982EADE40825@as.arizona.edu> (JD Smith's message of "Fri\, 29 Dec 2006 11\:57\:27 -0700")

JD Smith <jdsmith@as.arizona.edu> writes:

>> I just did M-x idlwave-mode in an empty buffer.  If that's not enough
>> to make the extra icons appear, that's why I didn't see them.
>
> Right, the icons appear only if the shell is running (which won't
> work without IDL installed).  Sorry for the confusion.  I have
> received numerous reports from users annoyed with the toolbar
> behavior, and have typically just instructed them how to disable to
> toolbar altogether.

Ok, so the current behaviour is not really acceptable.

I just implemented the `grow-only' setting for auto-resize-tool-bars,
and the use of C-l to reduce the height as suggested by RMS.

> Regarding the original spurious selection bug, I tried out your fix,
> and it does indeed defeat the selection when toolbar size changes.

Good!

> > However, I noticed two issues with the implementation:
>
> 1.  When you click to switch to another window within the frame, and
> the toolbar height changes, the point moves to the location of the
> cursor *after* the text is shifted.  Ideally, the point would be
> placed exactly where the user clicks (i.e. the click location before
> the toolbar resize occurs).

Yes.  I have noticed this too, but doing the right thing seems quite hard.

The problem is that the window+toolbar is redrawn before emacs sees
the mouse-up event -- so the position of the "up" event is the NEW
position.  We might find some way to DTRT, but it must wait until
after the release!

>
> 2. Clicking to drag a selection is now defeated when toolbar size
> changes.  Normally, if the focus is in a given window, click-dragging
> in another window in the frame immediately begins defining a
> selection.  With your fix in place, for windows with different
> toolbar heights, no selection is created when dragging in this manner
> (you must first give that window focus).

The problem is the same as above ... but it is even harder to do
right, as the position of the down event is handled before we update
the display, so if we have to handle this, we somehow have to go back
and patch that event to the new position ...  Not trivial!  So the
patch I made to fix the selection bug actually was an explicit flag to
ignore the the "drag" event imposed by the "down" event position
being at a different position that the new position after redisplay
has modified the toolbar height.

This is even harder to handle that 1, so it must also wait.

--
Kim F. Storm <storm@cua.dk> http://www.cua.dk

  reply	other threads:[~2006-12-29 23:38 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-13 22:44 Toolbar redraw causes unwanted selection JD Smith
2006-12-14 17:47 ` Richard Stallman
2006-12-14 22:26   ` Kim F. Storm
2006-12-15  0:24     ` Kim F. Storm
2006-12-15  5:03     ` Richard Stallman
2006-12-15 10:09       ` Kim F. Storm
2006-12-15 10:33         ` David Kastrup
2006-12-15 13:33           ` Kim F. Storm
2006-12-15 21:24             ` Richard Stallman
2006-12-15 23:42               ` Kim F. Storm
2006-12-16  2:22                 ` Werner LEMBERG
2006-12-16  9:53                 ` Eli Zaretskii
2006-12-17  0:56                   ` Kim F. Storm
2006-12-17  9:21                     ` Jan Djärv
2006-12-17  5:36                 ` Richard Stallman
2006-12-17 22:43                   ` Kim F. Storm
2006-12-18 16:00                     ` Richard Stallman
2006-12-19 10:07                       ` Kim F. Storm
2006-12-19 22:54                         ` David Kastrup
2006-12-20 13:01                         ` Richard Stallman
2006-12-30  0:35                           ` Kim F. Storm
2006-12-15 21:24         ` Richard Stallman
2006-12-15 22:22           ` David Kastrup
2006-12-18 16:14           ` JD Smith
2006-12-19 10:02             ` Kim F. Storm
2006-12-19 14:50               ` JD Smith
2006-12-19 16:09                 ` Kim F. Storm
2006-12-29  5:52                   ` JD Smith
2006-12-29  5:57                     ` Nick Roberts
2006-12-29  6:07                       ` JD Smith
2006-12-29 17:11                     ` Kim F. Storm
2006-12-29 18:57                       ` JD Smith
2006-12-29 23:38                         ` Kim F. Storm [this message]
2006-12-30 18:23                           ` Richard Stallman
2006-12-30 21:41                             ` Kim F. Storm
2006-12-29 22:58                     ` Richard Stallman
2006-12-29 23:41                       ` Drew Adams
2006-12-30 18:23                         ` Richard Stallman
2006-12-30 21:09                           ` Drew Adams
2006-12-30 21:20                             ` Drew Adams
2006-12-30 21:45                             ` Kim F. Storm
2006-12-30 21:50                               ` Drew Adams
2006-12-30 22:09                           ` Kim F. Storm
2006-12-31  1:46                             ` Richard Stallman
2006-12-20 13:00             ` Richard Stallman
2006-12-20 14:07               ` JD Smith

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=m3zm969srz.fsf@kfs-l.imdomain.dk \
    --to=storm@cua.dk \
    --cc=emacs-devel@gnu.org \
    --cc=rms@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.