projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7659d8a
)
window: Fix get_surface_transform()
author
Timm Bäder
<mail@baedert.org>
Wed, 20 May 2020 07:27:37 +0000
(09:27 +0200)
committer
Timm Bäder
<mail@baedert.org>
Wed, 20 May 2020 15:06:54 +0000
(17:06 +0200)
Look at the shadow here.
gtk/gtkwindow.c
patch
|
blob
|
history
diff --git
a/gtk/gtkwindow.c
b/gtk/gtkwindow.c
index 743210560de7a6ae25a9a88ee1ca212227b7be88..98ae78899015840d29f10fd82f30ef419f9c2a7f 100644
(file)
--- a/
gtk/gtkwindow.c
+++ b/
gtk/gtkwindow.c
@@
-1896,11
+1896,15
@@
gtk_window_native_get_surface_transform (GtkNative *native,
double *y)
{
GtkBorder shadow;
+ GtkCssBoxes css_boxes;
+ const graphene_rect_t *margin_rect;
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;
- *y = shadow.
right
;
+ *x = shadow.left
- margin_rect->origin.x
;
+ *y = shadow.
top - margin_rect->origin.y
;
}
static void