GNOME Bugzilla – Bug 708337
Double-clicking on network in Wi-Fi list doesn't work
Last modified: 2021-07-05 14:33:21 UTC
gnome-shell 3.9.91 Double-clicking on a network inside the "Wi-Fi networks" dialogue should do the same as clicking it and then clicking the connect button.
Created attachment 299128 [details] [review] Wi-Fi list: connect to network on double-click Add support for double-clicking on access points inside the NetworkManager modal dialog. This commit changes NMWirelessDialog's _selectNetwork() callback to fire the _connect() method when the current and former selected networks match. To actually act on clicks we need to stop relying on 'the key-focus-in' signal and move the emission of a 'selected' signal right into the 'clicked' action callback connected to NMWirelessDialogItem(s). This doesn't take into account the time to double-click though, which seems to be ingrained in the ClutterClickAction abstraction.
We might want to ignore double clicks up to a certain speed, and ClutterClickAction doesn't seem to register 'clicked' events for fast double-clicks unless they happened on different coordinates (i.e. clicking while moving the cursor). I'll try to prepare another patch using 'button-press-event' and 'button-released-event' instead of ClickAction. double_click_time from ClutterSettings might do it too.
Review of attachment 299128 [details] [review]: We definitively want a less-hacky solution here: ::: js/ui/status/network.js @@ -659,3 @@ reactive: true }); - this.actor.connect('key-focus-in', Lang.bind(this, function() { - this.emit('selected'); This breaks keyboard navigation ...
(In reply to Isaac David from comment #2) > We might want to ignore double clicks up to a certain speed, and > ClutterClickAction doesn't seem to register 'clicked' events for fast > double-clicks unless they happened on different coordinates (i.e. clicking > while moving the cursor). That sounds like a bug that should get fixed. > I'll try to prepare another patch using 'button-press-event' and > 'button-released-event' instead of ClickAction. Using one of them is probably fine, both will get tricky fairly quickly when you start handling sequences like button-1-press,button-2-press,button-2-release,button-1-release ... Have you tried recording the time of the first click with Clutter.get_current_event_time() and use that in combination with ClutterSettings (or GtkSettings)?
One more question: if using the button released event, do we want to track what button the event came from? I mean, is button-x-release followed by button-y-release a valid double click? I coudln't find other double-click behaviours anywhere in the Shell.
Created attachment 299781 [details] [review] Wi-Fi list: connect to network on double-click Add support for double-clicking on access points inside the NetworkManager modal dialog. Use GtkSettings to honor the time to double-click user preference.
Hi, any updates on this issue? Thanks,
Looks like this still applies correctly.
We need to get it merged then.
(In reply to Baurzhan M from comment #9) > We need to get it merged then. We don't apply patches as soon as they apply correctly. Applying correctly is the minimum for the patch to be reviewed. We're at that step now.
(In reply to Bastien Nocera from comment #10) > (In reply to Baurzhan M from comment #9) > > We need to get it merged then. > > We don't apply patches as soon as they apply correctly. Applying correctly > is the minimum for the patch to be reviewed. We're at that step now. Hi, I just built gnome-shell with this patch and it works in F25.
(In reply to Florian Müllner from comment #4) > (In reply to Isaac David from comment #2) > > We might want to ignore double clicks up to a certain speed, and > > ClutterClickAction doesn't seem to register 'clicked' events for fast > > double-clicks unless they happened on different coordinates (i.e. clicking > > while moving the cursor). > > That sounds like a bug that should get fixed. This comment still applies - "there's an issue with the high-level API, so I'm switching to the low-level one" isn't great, and throws away features the high-level API provides (like making sure that only press *and* release register as a click).
Review of attachment 299781 [details] [review]: The best way to fix this would be to add double-click support to the clutter-click-action.c in mutter's clutter copy, and use that.
*** Bug 783084 has been marked as a duplicate of this bug. ***
I thought gnome-shell migrated to GitLab for issue reporting, but I have only found https://gitlab.gnome.org/GNOME/gnome-shell/issues/296 - closed as a duplicated of that issue, not this one. Could anyone point me the current issue in GitLab to comment and subscribe for notifications?
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/ Thank you for your understanding and your help.