+ attr.wclass = GDK_INPUT_OUTPUT;
+ attr.visual = gtk_widget_get_visual(widget);
+ attr.colormap = gtk_widget_get_colormap(widget);
+ attr.window_type = GDK_WINDOW_CHILD;
+
+ // existing widget->window becomes m_draw_window,
+ // new widget->window created as parent of m_draw_window
+ widget->window = gdk_window_new(
+ gdk_window_get_parent(widget->window),
+ &attr,
+ GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP);
+
+ gdk_window_set_user_data(widget->window, widget);
+ gdk_window_reparent(pizza->m_draw_window, widget->window, 0, 0);
+ gdk_window_resize(pizza->m_draw_window, w, h);
+
+ // Parts of backing window may be exposed temporarily while
+ // resizing. Setting the backing pixmap to None prevents those
+ // areas from being briefly painted black.
+ gdk_window_set_back_pixmap(widget->window, NULL, false);
+
+ for (const GList* list = pizza->m_fixed.children; list; list = list->next)
+ {
+ const GtkFixedChild* child = static_cast<GtkFixedChild*>(list->data);
+ gtk_widget_set_parent_window(child->widget, pizza->m_draw_window);
+ }