[gtk/wip/baedert/for-master] listbox: Activate single-click rows if n_press >= 1
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master] listbox: Activate single-click rows if n_press >= 1
- Date: Thu, 10 Sep 2020 05:03:08 +0000 (UTC)
commit 1ddc18da15d76320a12229049e1a7f467f5d0e33
Author: Timm Bäder <mail baedert org>
Date: Thu Sep 10 07:01:18 2020 +0200
listbox: Activate single-click rows if n_press >= 1
Quickly clicking rows should always activate the row if
single-click-activation is enabled. Before, only the first click
(n_press == 1) would activate the row.
gtk/gtklistbox.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtklistbox.c b/gtk/gtklistbox.c
index bbee953b72..65b89cc4d7 100644
--- a/gtk/gtklistbox.c
+++ b/gtk/gtklistbox.c
@@ -1834,9 +1834,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 (n_press == 1 && box->activate_single_click)
+ if (box->activate_single_click)
gtk_list_box_select_and_activate_full (box, box->active_row, focus_on_click);
- else
+ else if (n_press == 2)
{
GdkEventSequence *sequence;
GdkInputSource source;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]