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:
parent
018786dab8
commit
ab36baa9b1
@ -118,12 +118,13 @@ meta_frame_content_size_allocate (GtkWidget *widget,
|
||||
{
|
||||
MetaFrameContent *content = META_FRAME_CONTENT (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,
|
||||
GTK_WIDGET (window),
|
||||
x, y,
|
||||
&x, &y);
|
||||
if (!gtk_widget_compute_point (widget,
|
||||
GTK_WIDGET (window),
|
||||
&point, &point))
|
||||
return;
|
||||
|
||||
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.
|
||||
*/
|
||||
(GtkBorder) {
|
||||
x * scale, 0,
|
||||
y * scale, 0,
|
||||
point.x * scale, 0,
|
||||
point.y * scale, 0,
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user