[libhandy] headerbar: Reset allocation coordinates before applying padding



commit a6737fcc68e99a99b9a4d35727943bb18e3804ac
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Fri Aug 14 16:26:00 2020 +0500

    headerbar: Reset allocation coordinates before applying padding
    
    Since HdyHeaderBar has its own GdkWindow, all children are allocated in a
    coordinate system where 0,0 matches headerbar corner rather than the whole
    window corner, and then we posiiton headerbar's window at the original
    coordinates.
    
    Since we position the window before applying CSS sizing, simply set the
    coordinates to 0 before applying it.
    
    This is a regression from 
https://gitlab.gnome.org/GNOME/libhandy/-/commit/4eb6c02c639f327b85dd6c8d23b73e3c143ddce2
    
    Fixes https://gitlab.gnome.org/GNOME/libhandy/-/issues/331
    
    Signed-off-by: Alexander Mikhaylenko <alexm gnome org>

 src/hdy-header-bar.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/src/hdy-header-bar.c b/src/hdy-header-bar.c
index c07a4021..32833006 100644
--- a/src/hdy-header-bar.c
+++ b/src/hdy-header-bar.c
@@ -1444,6 +1444,8 @@ hdy_header_bar_size_allocate (GtkWidget     *widget,
                             allocation->width,
                             allocation->height);
 
+  allocation->x = 0;
+  allocation->y = 0;
   hdy_css_size_allocate (widget, allocation);
 
   direction = gtk_widget_get_direction (widget);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]