[gtk/fix-listbox-selection] Revert "listbox: Activate single-click rows if n_press >= 1"
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/fix-listbox-selection] Revert "listbox: Activate single-click rows if n_press >= 1"
- Date: Fri, 16 Oct 2020 01:48:07 +0000 (UTC)
commit 8eb6e876bd194b98c22375f5c502b749b2d3ee43
Author: Matthias Clasen <mclasen redhat com>
Date: Thu Oct 15 21:45:34 2020 -0400
Revert "listbox: Activate single-click rows if n_press >= 1"
This reverts commit e669433cde60068099c7c03235475673d0ed7db4.
This broke selection in several listbox examples.
Fixes: #3263
gtk/gtklistbox.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtklistbox.c b/gtk/gtklistbox.c
index 189a68ea79..03334b477b 100644
--- a/gtk/gtklistbox.c
+++ b/gtk/gtklistbox.c
@@ -1842,9 +1842,9 @@ gtk_list_box_click_gesture_released (GtkGestureClick *gesture,
{
gboolean focus_on_click = gtk_widget_get_focus_on_click (GTK_WIDGET (box->active_row));
- if (box->activate_single_click)
+ if (n_press == 1 && box->activate_single_click)
gtk_list_box_select_and_activate_full (box, box->active_row, focus_on_click);
- else if (n_press == 2)
+ else
{
GdkEventSequence *sequence;
GdkInputSource source;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]