From ba909cf901183bd62534a8d9b6ae2be366d1ed3c Mon Sep 17 00:00:00 2001 From: Corey Berla Date: Mon, 25 Jul 2022 17:16:56 -0700 Subject: [PATCH] gridview: Fix get_items_in_rect() selection last_row should be dependent on y + height, not y --- gtk/gtkgridview.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk/gtkgridview.c b/gtk/gtkgridview.c index 869f4be206..f555752310 100644 --- a/gtk/gtkgridview.c +++ b/gtk/gtkgridview.c @@ -490,7 +490,7 @@ gtk_grid_view_get_items_in_rect (GtkListBase *base, if (!gtk_grid_view_get_cell_at_y (self, rect->y, &first_row, NULL, NULL)) first_row = rect->y < 0 ? 0 : n_items - 1; if (!gtk_grid_view_get_cell_at_y (self, rect->y + rect->height, &last_row, NULL, NULL)) - last_row = rect->y < 0 ? 0 : n_items - 1; + last_row = rect->y + rect->height < 0 ? 0 : n_items - 1; gtk_bitset_add_rectangle (result, first_row + first_column,