[gtk: 5/11] gridview: Return an empty bitset when selecting only empty space
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 5/11] gridview: Return an empty bitset when selecting only empty space
- Date: Tue, 26 Jul 2022 01:08:09 +0000 (UTC)
commit f3fc8f5b35944c28e515573c59af424ffcef072a
Author: Corey Berla <corey berla me>
Date: Mon Jul 25 15:55:13 2022 -0700
gridview: Return an empty bitset when selecting only empty space
Return an empty bitset if the user selects exclusively below the last
row. No need to calculate selection.
gtk/gtkgridview.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gtk/gtkgridview.c b/gtk/gtkgridview.c
index f555752310..e7fe878a59 100644
--- a/gtk/gtkgridview.c
+++ b/gtk/gtkgridview.c
@@ -481,6 +481,9 @@ gtk_grid_view_get_items_in_rect (GtkListBase *base,
result = gtk_bitset_new_empty ();
+ if (rect->y >= gtk_grid_view_compute_total_height (self))
+ return result;
+
n_items = gtk_list_base_get_n_items (base);
if (n_items == 0)
return result;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]