[gtk/gtk-4-6: 1/3] treeview: Use widget coordinates where required
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-4-6: 1/3] treeview: Use widget coordinates where required
- Date: Tue, 16 Aug 2022 21:34:05 +0000 (UTC)
commit e1dcbd4442851137b768e80542bbd5f8f9e1e186
Author: Mat <mail mathias is>
Date: Wed Aug 10 04:09:48 2022 +0300
treeview: Use widget coordinates where required
When a GtkTreeView scrolled horizontally, it was not possible to
select rows outside the initial area due to an erroneous comparison
between widget and bin window coordinates.
Original change to widget coordinates occurred in commit
a0de570e47228094f430fcade4e6f56eb75bd8f5
gtk/gtktreeview.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index fef8819e60..4417ca20c6 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -2869,8 +2869,8 @@ gtk_tree_view_click_gesture_pressed (GtkGestureClick *gesture,
continue;
background_area.width = gtk_tree_view_column_get_width (candidate);
- if ((background_area.x > bin_x) ||
- (background_area.x + background_area.width <= bin_x))
+ if ((background_area.x > x) ||
+ (background_area.x + background_area.width <= x))
{
background_area.x += background_area.width;
continue;
@@ -2976,7 +2976,7 @@ gtk_tree_view_click_gesture_pressed (GtkGestureClick *gesture,
focus_cell = _gtk_tree_view_column_get_cell_at_pos (column,
&cell_area,
&background_area,
- bin_x, bin_y);
+ x, y);
if (focus_cell)
gtk_tree_view_column_focus_cell (column, focus_cell);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]