fixed: x/y passed to get_child_position are not optional

This commit is contained in:
Timm Bäder 2019-08-25 14:59:01 +02:00
parent 1db59d1c89
commit 31efc882db

View File

@ -183,8 +183,8 @@ gtk_fixed_put (GtkFixed *fixed,
void
gtk_fixed_get_child_position (GtkFixed *fixed,
GtkWidget *widget,
gint *x,
gint *y)
int *x,
int *y)
{
GtkFixedPrivate *priv = gtk_fixed_get_instance_private (fixed);
GtkFixedLayoutChild *child_info;
@ -193,16 +193,16 @@ gtk_fixed_get_child_position (GtkFixed *fixed,
g_return_if_fail (GTK_IS_FIXED (fixed));
g_return_if_fail (GTK_IS_WIDGET (widget));
g_return_if_fail (x != NULL);
g_return_if_fail (y != NULL);
g_return_if_fail (gtk_widget_get_parent (widget) == GTK_WIDGET (fixed));
child_info = GTK_FIXED_LAYOUT_CHILD (gtk_layout_manager_get_layout_child (priv->layout, widget));
transform = gtk_fixed_layout_child_get_transform (child_info);
gsk_transform_to_translate (transform, &pos_x, &pos_y);
if (x != NULL)
*x = floorf (pos_x);
if (y != NULL)
*y = floorf (pos_y);
*x = floorf (pos_x);
*y = floorf (pos_y);
}
/**