After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 75796 - panel needs better double-click detection and handling
panel needs better double-click detection and handling
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: panel
1.5.x
Other other
: Normal enhancement
: ---
Assigned To: Panel Maintainers
Panel Maintainers
Depends on:
Blocks:
 
 
Reported: 2002-03-21 20:48 UTC by tempest
Modified: 2015-03-24 13:00 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for this. (2.64 KB, patch)
2003-11-28 10:48 UTC, Vincent Untz
needs-work Details | Review
Updated patch (2.72 KB, patch)
2003-11-28 11:38 UTC, Vincent Untz
needs-work Details | Review
Updated patch. (2.63 KB, patch)
2004-10-29 13:03 UTC, Vincent Untz
needs-work Details | Review
The good way to do this? (1.14 KB, patch)
2004-10-29 13:51 UTC, Vincent Untz
needs-work Details | Review

Description tempest 2002-03-21 20:48:15 UTC
Package: gnome-panel
Severity: normal
Version: 1.4.0.6
Synopsis: panel needs better double-click detection and handling
Bugzilla-Product: gnome-panel
Bugzilla-Component: Panel

Description:
I have observed no less than 3 of my friends and co-workers who, when
working with Gnome, almost OBSESSIVELY double-click panel launchers. 
Even after a simple reminder that doing so is unnecessary, they still
seem to insist on it.

This may confuse new users, as they will not understand why their
application has launched twice, and so for them, this reflects badly on
Gnome.

I think a timeout of a full second might be appropriate for panel
launchers, as I cannot think of a single instance where someone might
actually *want* to open several copies of a particular program all at
once.




------- Bug moved to this database by unknown@bugzilla.gnome.org 2002-03-21 15:48 -------

The original reporter (tempest@chartermi.net) of this bug does not have an account here.
Reassigning to the exporter, unknown@bugzilla.gnome.org.
Reassigning to the default owner of the component, gnome-panel-maint@bugzilla.gnome.org.

Comment 1 Mark McLoughlin 2002-03-22 11:02:02 UTC
Usability enhancement request
Comment 2 Luis Villa 2002-05-01 16:07:22 UTC
This would probably be sort of free once we implement sane launch
notification, no?
Comment 3 Jens Knutson 2002-05-01 22:12:15 UTC
(note: I'm actually the submitter of this bug - don't ask why it's
under a different email address. ;)

This doesn't really help the problem I'm describing - the behavior I'm
seeing doesn't seem to be because users don't see the app launching
instantly, they double-click because they don't understand they don't
NEED to do so - people are so trained on the "double click" method for
opening programs that they apply it everywhere.  This goes for the
panel, web links... just about everything.  It's just that in the
panel, it's especially obnoxious because it opens some apps twice when
users do this.
Comment 4 Ben FrantzDale 2002-12-07 00:31:49 UTC
I think what Jens is saying is that the pannel buttons should be
"debounced" more than they already are.

I think currently the threshold is .5 seconds. If you click at t=0s
and then at t=0.51s, though, you'll get two launches.

I'm not sure of a good way to fix this. If that threshold gets up
towards one second, users actually trying to open a launcher twice (an
admitedly a rare occasion) would get an unresponsive panel.

(I think the solution is really to have consistancy so users dont'
worry about single versus double clicking. Also, having the mouse
cursor become a pointing finger over single-clickable items would make
the single-click affordance more clear.)
Comment 5 Reinout van Schouwen 2003-11-26 22:41:38 UTC
target should be bumped up to 2.6!
Comment 6 dmoisset 2003-11-27 17:21:12 UTC
I think the debouncing threshold shouldn't be a fixed number like 0.5
or 1 second, but the threshold used in the rest of the system to
difference between a double click and two single clicks.

Currently, that is the number stored in 
gconf:///desktop/gnome/peripherals/mouse/double_click

That way you have consistence with the rest of the desktop i.e, the
desktop uses always the same criteria to difference double clicks from
click click.
Comment 7 Vincent Untz 2003-11-28 10:48:24 UTC
Created attachment 21889 [details] [review]
Patch for this.
Comment 8 Vincent Untz 2003-11-28 10:50:07 UTC
I liked the idea of using
gconf:///desktop/gnome/peripherals/mouse/double_click and I found it
reasonable, so here's a patch implementing this.

It works well for me.
Comment 9 Vincent Untz 2003-11-28 11:38:26 UTC
Created attachment 21892 [details] [review]
Updated patch
Comment 10 Vincent Untz 2003-11-28 11:39:01 UTC
Arvind made some useful comments, so I updated the patch.
Comment 11 Mark McLoughlin 2003-12-01 15:58:02 UTC
I don't get it. gtk+ already respects this GConf key:

  + gnome-settings-daemon translates this into the 
    "Net/DoubleClickTime" XSETTING and gdk (see gdkevents-x11.c)
    maps this into the "gtk-double-click-time" setting.

  + gtk (in gtksettings.c) sets this value in gdk again with
    gdk_display_set_double_click_time()

  + if you get two single clicks within that time you get a
    GDK_2BUTTON_PRESS.

There should be some better way of doing this patch using all
this, right ?

Also, why no do this in ButtonWidget ?
Comment 12 Reinout van Schouwen 2003-12-01 20:52:55 UTC
I don't get it either. 

The global double click treshold is meant to differentiate between
single- and double click. This is useful for people who can't click
two times rapidly in succession.

However the problem here is completely different. Users are double
clicking *on purpose* in the expectation to activate a panel object.
The undesired effect is a double activation of the object. That is
what this bug is about.
Comment 13 Ben FrantzDale 2003-12-02 05:59:28 UTC
Although this is debouncing as opposed to counting two clicks as a
doublie-click, I think the timeout should be the same. A user is
double-clicking exactly when two clicks in the same place are within
double_click. Basicly the solution to this bug is the patch that was
posted, which essentially allows panel launchers to accept single or
double clicks and only launch once. 
Comment 14 Vincent Untz 2004-01-06 20:17:23 UTC
Simple note: forget my previous patch. There's already such a timer in
ButtonWidget. But it waits for 400 ms. This is what needs to be fixed:
it should not be hard-coded.
Comment 15 Mark McLoughlin 2004-04-20 09:22:27 UTC
*** Bug 128389 has been marked as a duplicate of this bug. ***
Comment 16 Nick Dimiduk 2004-04-30 14:56:31 UTC
Setting patch 21889 obselete, marking patch 21892 needs-work based on Comment #14.
Comment 17 Christian Neumair 2004-10-21 13:18:05 UTC
Vincent: grepping through the gnome-panel/button-widget.c source code revealed
that there is no such timeout.
Where is it located, if it still exists?

regs,
 Chris
Comment 18 Vincent Untz 2004-10-29 13:03:29 UTC
Created attachment 33201 [details] [review]
Updated patch.

Just for reference, I updated the old patch but it should not go in. I think
Mark is right and there's a better way to handle this.
Comment 19 Vincent Untz 2004-10-29 13:09:57 UTC
Hrm...
Mark: AFAICT, the activate event happens on BUTTON_RELEASE.

According to the doc:
"
Double and triple-clicks result in a sequence of events being received. For
double-clicks the order of events will be:

   1.GDK_BUTTON_PRESS
   2.GDK_BUTTON_RELEASE
   3.GDK_BUTTON_PRESS
   4.GDK_2BUTTON_PRESS
   5.GDK_BUTTON_RELEASE
"

Is remembering the last *_PRESS event a better way to handle this?

This would be something like:
  if (type == GDK_BUTTON_RELEASE && prev_type != GDK_BUTTON_PRESS)
    return;
Comment 20 Vincent Untz 2004-10-29 13:51:56 UTC
Created attachment 33203 [details] [review]
The good way to do this?

Ok, this would look like this. I can't test it so I don't know if it works.
Comment 21 Vincent Untz 2004-11-26 10:01:13 UTC
Comment on attachment 33203 [details] [review]
The good way to do this?

This patch doesn't work. I'm confused because there are three events involved
(pressed, activated, clicked). Need to look at this when I'll have more time.
Comment 22 David William Price 2005-03-14 16:27:29 UTC
This is still an active bug. Although I change the mouse preferences dialogue
for a one-second double click timeout, I can still launch two instances of
firefox when I doubleclick on the panel. 
Comment 23 Reinout van Schouwen 2005-03-15 13:46:06 UTC
Setting GNOME version to 2.9/2.10.
Comment 24 Baris Cicek 2005-04-03 22:54:17 UTC
Vincent: Why merging single click behavour, and double click behavior (which is
not actually exist) or even triple click is not enough? 
Comment 25 Vincent Untz 2005-12-27 15:52:35 UTC
Fixed in HEAD.