listview: Allow starting rubberband in empty space below last row

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
This commit is contained in:
Corey Berla 2022-07-25 17:00:46 -07:00
parent e14b84ff67
commit d6fab1408a

View File

@ -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;