[gtk: 8/11] listview: Return an empty bitset when selecting only empty space
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk: 8/11] listview: Return an empty bitset when selecting only empty space
- Date: Tue, 26 Jul 2022 01:08:09 +0000 (UTC)
commit e14b84ff67bed10cc2ba6f2becbc89fd425657cc
Author: Corey Berla <corey berla me>
Date: Mon Jul 25 16:59:35 2022 -0700
listview: Return an empty bitset when selecting only empty space
Return an empty bitset if the user selects exclusively below the last
row.
gtk/gtklistview.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/gtk/gtklistview.c b/gtk/gtklistview.c
index 69b822b316..a939fdc520 100644
--- a/gtk/gtklistview.c
+++ b/gtk/gtklistview.c
@@ -377,6 +377,9 @@ gtk_list_view_get_items_in_rect (GtkListBase *base,
result = gtk_bitset_new_empty ();
+ if (rect->y >= gtk_list_view_get_list_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]