projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e14b84f
)
listview: Allow starting rubberband in empty space below last row
author
Corey Berla
<corey@berla.me>
Tue, 26 Jul 2022 00:00:46 +0000
(17:00 -0700)
committer
Corey Berla
<corey@berla.me>
Tue, 26 Jul 2022 00:55:15 +0000
(17:55 -0700)
Rubberband does not work when initiated past the last row
(warning is printed "Could not start rubberbanding: No item).
Clamp y at the max height of the widgets in the listview
gtk/gtklistview.c
patch
|
blob
|
history
diff --git
a/gtk/gtklistview.c
b/gtk/gtklistview.c
index a939fdc52090ca4d4d43435bfe1ca1a7ca85931b..244633fb968ed90ea4357826bbfdaa71952a25de 100644
(file)
--- a/
gtk/gtklistview.c
+++ b/
gtk/gtklistview.c
@@
-428,6
+428,8
@@
gtk_list_view_get_position_from_allocation (GtkListBase *base,
if (across >= self->list_width)
return FALSE;
+ along = CLAMP (along, 0, gtk_list_view_get_list_height (self) - 1);
+
row = gtk_list_view_get_row_at_y (self, along, &remaining);
if (row == NULL)
return FALSE;