summaryrefslogtreecommitdiff
path: root/gtk/gtkoverlay.c
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2018-03-01 21:47:36 +0100
committerTimm Bäder <mail@baedert.org>2018-03-04 19:12:04 +0100
commitcfbac153a35ea524273ce498f205948df7dc935c (patch)
tree07f2ac0a03f55eb0f07e4b11c2dee665dbfbef66 /gtk/gtkoverlay.c
parentddcc9b9f2f2929b17c08667e3d311ea0247f9fea (diff)
downloadgtk+-cfbac153a35ea524273ce498f205948df7dc935c.tar.gz
overlay: Fix coordinates in child_update_style_classes
Both main child and all others are in the same coordinate space, so no need to add the parent position here.
Diffstat (limited to 'gtk/gtkoverlay.c')
-rw-r--r--gtk/gtkoverlay.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/gtk/gtkoverlay.c b/gtk/gtkoverlay.c
index 63636d8cde..287d63eb06 100644
--- a/gtk/gtkoverlay.c
+++ b/gtk/gtkoverlay.c
@@ -181,7 +181,7 @@ gtk_overlay_child_update_style_classes (GtkOverlay *overlay,
GtkWidget *child,
GtkAllocation *child_allocation)
{
- GtkAllocation overlay_allocation, main_allocation;
+ GtkAllocation main_allocation;
GtkAlign valign, halign;
gboolean is_left, is_right, is_top, is_bottom;
gboolean has_left, has_right, has_top, has_bottom;
@@ -196,10 +196,6 @@ gtk_overlay_child_update_style_classes (GtkOverlay *overlay,
is_left = is_right = is_top = is_bottom = FALSE;
gtk_overlay_get_main_widget_allocation (overlay, &main_allocation);
- gtk_widget_get_allocation (GTK_WIDGET (overlay), &overlay_allocation);
-
- main_allocation.x += overlay_allocation.x;
- main_allocation.y += overlay_allocation.y;
halign = effective_align (gtk_widget_get_halign (child),
gtk_widget_get_direction (child));