frames/content: Use gtk_widget_compute_point()

The non-graphene-point variant is deprecated.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2949>
This commit is contained in:
Jonas Ådahl 2023-04-04 09:42:37 +02:00 committed by Marge Bot
parent 018786dab8
commit ab36baa9b1

View File

@ -118,12 +118,13 @@ meta_frame_content_size_allocate (GtkWidget *widget,
{ {
MetaFrameContent *content = META_FRAME_CONTENT (widget); MetaFrameContent *content = META_FRAME_CONTENT (widget);
GtkWindow *window = GTK_WINDOW (gtk_widget_get_root (widget)); GtkWindow *window = GTK_WINDOW (gtk_widget_get_root (widget));
double x = 0, y = 0, scale; graphene_point_t point = {};
double scale;
gtk_widget_translate_coordinates (widget, if (!gtk_widget_compute_point (widget,
GTK_WIDGET (window), GTK_WIDGET (window),
x, y, &point, &point))
&x, &y); return;
scale = gdk_surface_get_scale_factor (gtk_native_get_surface (GTK_NATIVE (window))); scale = gdk_surface_get_scale_factor (gtk_native_get_surface (GTK_NATIVE (window)));
@ -132,8 +133,8 @@ meta_frame_content_size_allocate (GtkWidget *widget,
* are ever other than 0. * are ever other than 0.
*/ */
(GtkBorder) { (GtkBorder) {
x * scale, 0, point.x * scale, 0,
y * scale, 0, point.y * scale, 0,
}); });
} }