window: Use non-deprecated function

gtk_widget_compute_point() is the hot new thing.
This commit is contained in:
Georges Basile Stavracas Neto
2023-08-11 15:13:44 -03:00
parent 77f355ed53
commit 95cc40d8a8
+10 -9
View File
@@ -563,9 +563,8 @@ show_new_event_widget (GcalView *view,
gdouble y, gdouble y,
GcalWindow *window) GcalWindow *window)
{ {
graphene_point_t p;
GdkRectangle rect; GdkRectangle rect;
gdouble out_x;
gdouble out_y;
GCAL_ENTRY; GCAL_ENTRY;
@@ -596,15 +595,17 @@ show_new_event_widget (GcalView *view,
window->event_creation_data->end_date); window->event_creation_data->end_date);
/* Position and place the quick add popover */ /* Position and place the quick add popover */
gtk_widget_translate_coordinates (window->views[window->active_view], if (!gtk_widget_compute_point (window->views[window->active_view],
GTK_WIDGET (window), GTK_WIDGET (window),
x, y, &GRAPHENE_POINT_INIT (x, y),
&out_x, &p))
&out_y); {
g_assert_not_reached ();
}
/* Place popover over the given (x,y) position */ /* Place popover over the given (x,y) position */
rect.x = out_x; rect.x = p.x;
rect.y = out_y; rect.y = p.y;
rect.width = 1; rect.width = 1;
rect.height = 1; rect.height = 1;