What should I use to get the double-click time

Hi all:

I just wondered what should I use to get the double-click time in any system, no matter if it has mouse or touch screen:

  • gsettings and read org.gnome.settings-daemon.peripherals.mouse double-click

  • or install clutter dependencies and use Clutter.Settings.get_default().doble_click_time?


There’s literally no reason whatsoever to install Clutter.

This is a system setting that is controlled by the configuration system of the environment, and toolkits should read that information for their internal event handling.

The question is: what are you trying to achieve by knowing the double click time?

I received a patch for Desktop Icons NG that implemented the double click detection without taking into account the displacement between clicks, because, as the author explained, the default double click manager doesn’t work fine for touch screens…

It was a patch similar to another already sent for the original desktop icons.

Complementing the previous message: that code needs to take the double-click time from somewhere, so it took it from clutter settings.

I presume that this has been fixed in Gtk4, but… I’m still in Gtk3.

See Settings: GTK+ 3 Reference Manual

1 Like

Mmm… odd… I don’t have any of those two properties in my system…

Oh… it’s GtkSetting, not GSettings… Ok.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.