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 788397 - GtkListBox: Do not grab focus twice when activating a row via double click
GtkListBox: Do not grab focus twice when activating a row via double click
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: Other
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-10-01 14:26 UTC by Jonathan Moerman
Modified: 2018-05-02 19:10 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jonathan Moerman 2017-10-01 14:26:58 UTC
If you have a GtkListBox with activate_on_single_click set to false and double click on a row that results in:
 1. the row receiving focus
 2. the row being activated
 3. row receiving focus again

If the row_activated signal is used to, for example focus on an child GtkEntry within the row that is hidden once this entry loses focus this causes issues, as the entry will immediately lose focus.

Suggested behavior: Only make the clicked row grab focus once. (before row_activated is emitted.)
It really doesn't make sense to grab focus twice.

I have not tested with master, but looking at gtk_list_box_multipress_gesture_released I think this behavior will still occur.

It would be great if this weird behavior isn't carried over to Gtk+-4.0.

(Reproduced with Gtk+-3.0 versions 3.18 and 3.22 (I think I've tested it with 3.14 too), I haven't tested any other versions.)
Comment 1 GNOME Infrastructure Team 2018-05-02 19:10:45 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/930.