Commit f7d861a7 authored by Alexander Mikhaylenko's avatar Alexander Mikhaylenko
Browse files

paginator-box: Register window before setting parent

Prevents newly created widgets from reusing parent's window.

Fixes a regression from e6a47749

Fixes Librem5/libhandy#165

Signed-off-by: Alexander Mikhaylenko's avatarAlexander Mikhaylenko <>
parent e92c7a3b
......@@ -610,8 +610,6 @@ hdy_paginator_box_add (GtkContainer *container,
HdyPaginatorBox *self = HDY_PAGINATOR_BOX (container);
HdyPaginatorBoxChildInfo *info;
gtk_widget_set_parent (widget, GTK_WIDGET (container));
info = g_new0 (HdyPaginatorBoxChildInfo, 1);
info->widget = widget;
......@@ -620,6 +618,8 @@ hdy_paginator_box_add (GtkContainer *container,
self->children = g_list_append (self->children, info);
gtk_widget_set_parent (widget, GTK_WIDGET (container));
invalidate_drawing_cache (self);
g_object_notify_by_pspec (G_OBJECT (self), props[PROP_N_PAGES]);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment