GTK4 and mouse click position in a GtkTreeView

Hello world,
still in the process of migrating my app from GTK3 to GTK4, I am facing some issue with the management of mouse click event over a GtkTreeView.
I want to find the point where the mouse click happened, you will here the code I wrote:

void measure_tree_button_event (GtkWidget * widget, double event_x, double event_y, guint event_button, gpointer data)
{
  if (event_button == 1)
  {
    GtkTreeModel * measure_model = gtk_tree_view_get_model(GTK_TREE_VIEW(widget));
    GtkTreePath * path;
    GtkTreeViewColumn * column;
    int i, j;
    if (gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW(widget), event_x, event_y, & path, & column, & i,  & j))
    {
      GtkTreeIter row;
      if  (gtk_tree_model_get_iter (measure_model, & row, path))
      {
        gtk_tree_model_get (measure_model, & row, 0, & j, -1);
        // Then do something      
      }
    }
  }
}

#ifdef GTK3
G_MODULE_EXPORT gboolean measure_tree_selection_event (GtkWidget * widget, GdkEventButton * event, gpointer data)
{
  if (event -> type == GDK_BUTTON_PRESS)
  {
    GdkEventButton * bevent = (GdkEventButton*)event;
    measure_tree_button_event (widget, bevent -> x, bevent -> y, bevent -> button, data);
  }
  return FALSE;
}
#else
G_MODULE_EXPORT void measure_tree_button_pressed (GtkGesture * gesture, int n_press, double x, double y, gpointer data)
{
  measure_tree_button_event (gtk_event_controller_get_widget ((GtkEventController*)gesture), x, y, gtk_gesture_single_get_current_button ((GtkGestureSingle * )gesture), data);
}
#endif

GtkWidget * creating_tree_view (GtkTreeModel * model, gpointer data)
{
  GtkWidget * selection_tree = gtk_tree_view_new_with_model(model);
#ifdef GTK4
  gesture = gtk_gesture_click_new ();
  gtk_event_controller_set_name (GTK_EVENT_CONTROLLER (gesture), "clicked");
  gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (gesture), 0);
  g_signal_connect (gesture, "pressed", G_CALLBACK(measure_tree_button_pressed), data);
  gtk_widget_add_controller (widget, GTK_EVENT_CONTROLLER (gesture));
#else
  g_signal_connect (G_OBJECT(selection_tree), "button_press_event", G_CALLBACK(measure_tree_selection_event), data);
#endif
  }
  return selection_tree;
}

With GTK3 no issue the mouse click return the proper position in the GtkTreeView, with GTK4 however the position in wrong and is down one more row than it should … so far I was not able to understand what is wrong if anything.
Any idea would be appreciated !

Thanks in advance for your lights :wink:

PS: is there any way to highlight code in the post so that it can be read more easily, sometimes it seems to work that way but some other it does not …