[libadwaita/wip/exalm/entry-select] entry-row: Don't select text when clicking the row
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libadwaita/wip/exalm/entry-select] entry-row: Don't select text when clicking the row
- Date: Mon, 25 Jul 2022 06:16:45 +0000 (UTC)
commit c892277258719b2186332154a5b4023f91413d65
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Mon Jul 25 10:11:57 2022 +0400
entry-row: Don't select text when clicking the row
While the internal GtkText spans most of the row, it doesn't cover all of
it. In particular, this is noticeable with prefix or suffix widgets.
When clicking inside the GtkText, it just focused it and moves the text
cursor. However, when clicking outside it, it also selects the text. Change
that so it feels less random.
src/adw-entry-row.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/adw-entry-row.c b/src/adw-entry-row.c
index c175f64c..d93af57f 100644
--- a/src/adw-entry-row.c
+++ b/src/adw-entry-row.c
@@ -217,7 +217,7 @@ pressed_cb (GtkGesture *gesture,
return;
}
- gtk_widget_grab_focus (GTK_WIDGET (priv->text));
+ gtk_text_grab_focus_without_selecting (GTK_TEXT (priv->text));
gtk_gesture_set_state (gesture, GTK_EVENT_SEQUENCE_CLAIMED);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]