Web lists-archives.com

Is gtk_paned_get_preferred_size_for_opposite_orientation() computing handle_size correctly?

I have been debugging a failed assertion when requesting a window size and using thin handles in a GtkPaned in GTK+ 3.22.

I believe the problem is in the function gtk_paned_get_preferred_size_for_opposite_orientation(). Here, handle_size is computed with:

gtk_css_gadget_get_preferred_size (priv->handle_gadget,
                                   OPPOSITE_ORIENTATION (priv->orientation),
                                   NULL, &handle_size,
                                   NULL, NULL);

But, if I'm reading the code correctly, it should be getting the size in the orientation priv->orientation, not it's opposite. 

For example, in a horizontal GtkPaned, this function should return the height based on the provided width in size.To compute the width of child2 it should subtract from size the width of child1 and the width of the handle. The width of the handle should then be computed in the same orientation as the widget. Then, based on these widths, the height of each child is measured and the maximum of them taken as the result.

Am I understanding this correctly?, should I make a PR with the single line change?

Santiago León O.
gtk-list mailing list