- if (pizza->m_is_scrollable)
- {
- attr.x += border_x;
- attr.y += border_y;
- attr.width = w;
- attr.height = h;
- }
- 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;
-
- pizza->m_backing_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(pizza->m_backing_window, widget);
- if (pizza->m_is_scrollable)
- gdk_window_reparent(widget->window, pizza->m_backing_window, 0, 0);
- else
- gdk_window_reparent(widget->window, pizza->m_backing_window, border_x, border_y);
- gdk_window_resize(widget->window, w, h);
-
- // Parts of m_backing_window which are supposed to be obscured 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(pizza->m_backing_window, NULL, false);