diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 85b2c3ba0c..c030a43b4d 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -3473,34 +3473,6 @@ gtk_widget_unrealize (GtkWidget *widget) g_object_unref (widget); } -void -gtk_widget_get_surface_allocation (GtkWidget *widget, - GtkAllocation *allocation) -{ - GtkNative *native; - graphene_rect_t bounds; - double nx, ny; - - native = gtk_widget_get_native (widget); - - g_assert (GTK_IS_WINDOW (native) || GTK_IS_POPOVER (native)); - gtk_native_get_surface_transform (native, &nx, &ny); - - if (gtk_widget_compute_bounds (widget, GTK_WIDGET (native), &bounds)) - { - *allocation = (GtkAllocation) { - floorf (bounds.origin.x) + nx, - floorf (bounds.origin.y) + ny, - ceilf (bounds.size.width), - ceilf (bounds.size.height) - }; - } - else - { - *allocation = (GtkAllocation) { 0, 0, 0, 0 }; - } -} - /** * gtk_widget_queue_draw: * @widget: a `GtkWidget` diff --git a/gtk/gtkwidgetprivate.h b/gtk/gtkwidgetprivate.h index d902e7117f..581b7db19d 100644 --- a/gtk/gtkwidgetprivate.h +++ b/gtk/gtkwidgetprivate.h @@ -316,9 +316,6 @@ gboolean gtk_widget_focus_move (GtkWidget *wi GtkDirectionType direction); void gtk_widget_set_has_focus (GtkWidget *widget, gboolean has_focus); -void gtk_widget_get_surface_allocation (GtkWidget *widget, - GtkAllocation *allocation); - GtkWidget * gtk_widget_common_ancestor (GtkWidget *widget_a, GtkWidget *widget_b);