mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-15 06:40:08 +00:00
window: Fix get_surface_transform()
Look at the shadow here.
This commit is contained in:
parent
7659d8af3d
commit
8c884e94c2
@ -1896,11 +1896,15 @@ gtk_window_native_get_surface_transform (GtkNative *native,
|
|||||||
double *y)
|
double *y)
|
||||||
{
|
{
|
||||||
GtkBorder shadow;
|
GtkBorder shadow;
|
||||||
|
GtkCssBoxes css_boxes;
|
||||||
|
const graphene_rect_t *margin_rect;
|
||||||
|
|
||||||
get_shadow_width (GTK_WINDOW (native), &shadow);
|
get_shadow_width (GTK_WINDOW (native), &shadow);
|
||||||
|
gtk_css_boxes_init (&css_boxes, GTK_WIDGET (native));
|
||||||
|
margin_rect = gtk_css_boxes_get_margin_rect (&css_boxes);
|
||||||
|
|
||||||
*x = shadow.left;
|
*x = shadow.left - margin_rect->origin.x;
|
||||||
*y = shadow.right;
|
*y = shadow.top - margin_rect->origin.y;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user