GNU bug report logs - #42887
28.0.50; Customize Group doesn't show/hide option on repeated clicking

Previous Next

Package: emacs;

Reported by: Stefan Kangas <stefan <at> marxist.se>

Date: Sun, 16 Aug 2020 14:03:01 UTC

Severity: minor

Tags: patch

Found in version 28.0.50

Full log


Message #31 received at 42887 <at> debbugs.gnu.org (full text, mbox):

From: Mauro Aranda <maurooaranda <at> gmail.com>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 42887 <at> debbugs.gnu.org
Subject: Re: bug#42887: 28.0.50; Customize Group doesn't show/hide option on
 repeated clicking
Date: Tue, 17 Nov 2020 09:07:28 -0300
[Message part 1 (text/plain, inline)]
Stefan Kangas <stefan <at> marxist.se> writes:

> Mauro Aranda <maurooaranda <at> gmail.com> writes:
>
>> Stefan Kangas <stefan <at> marxist.se> writes:
>>
>>> Mauro Aranda <maurooaranda <at> gmail.com> writes:
>>>
>>>> Only when I click "too fast" the option doesn't expand,
>>>
>>> That's different from what I'm seeing.  I can wait several seconds
>>> between clicks, and as long as I don't move the mouse cursor the option
>>> won't expand.
>>
>> I think I misunderstood your recipe.  Does an option that starts as
hidden
>> never expand for you in the recipe?
>
> No, it does expand on the first click.
>
> It will not expand on repeated clicks unless I move the mouse cursor
> between clicks.  The delay does not matter (except if I click too fast I
> see double-click events).

Then I definitely can't reproduce this.  Does it happen with mouse-1 and
mouse-2? I think you didn't mention that in your recipe.

> So I had a quick look, and the defun `custom-toggle-hide-variable' is
> called on the first click.  The option then correctly expands.
>
> But that function is not called on subsequent clicks.  After moving the
> mouse cursor and clicking, it seems to register again and
> `custom-toggle-hide-variable' is called.

custom-toggle-hide-variable is the :action function for the widget you
are clicking.  It should be called if
widget-button--check-and-call-button detects a mouse-1 or mouse-2 event
at that widget.  AFAIK, there are 2 reasons why it doesn't
call the :action function: either it gets a mouse-1 event and then a
mouse-movement event, returning t, or it doesn't think the button where
the mouse click ended is the same button where the mouse click started.
I.e., this evaluates to nil:
(and pos (eq (get-char-property pos 'button) button))
In this case, widget-button--check-and-call-button will return nil.

I suspect the former happens and not the latter, but I can't be sure.
Maybe you can test what's the return value of
widget-button--check-and-call-button.
[Message part 2 (text/html, inline)]

This bug report was last modified 81 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.