Commit a9a59ac5 authored by Tristan Van Berkom's avatar Tristan Van Berkom

scrolledwindow: Fix calls to gdk_window_move_resize()

This is a bit of fallout from 34feba1e, now that we resolve
the has_indicators value earlier than realize, it becomes
possible to call gdk_window_move_resize() before realization.

Just added the appropriate checks.
parent 32675db4
......@@ -1710,11 +1710,12 @@ gtk_scrolled_window_allocate (GtkCssGadget *gadget,
&child_allocation);
if (priv->use_indicators)
{
gdk_window_move_resize (priv->hindicator.window,
child_allocation.x,
child_allocation.y,
child_allocation.width,
child_allocation.height);
if (gtk_widget_get_realized (widget))
gdk_window_move_resize (priv->hindicator.window,
child_allocation.x,
child_allocation.y,
child_allocation.width,
child_allocation.height);
child_allocation.x = 0;
child_allocation.y = 0;
}
......@@ -1729,11 +1730,12 @@ gtk_scrolled_window_allocate (GtkCssGadget *gadget,
&child_allocation);
if (priv->use_indicators)
{
gdk_window_move_resize (priv->vindicator.window,
child_allocation.x,
child_allocation.y,
child_allocation.width,
child_allocation.height);
if (gtk_widget_get_realized (widget))
gdk_window_move_resize (priv->vindicator.window,
child_allocation.x,
child_allocation.y,
child_allocation.width,
child_allocation.height);
child_allocation.x = 0;
child_allocation.y = 0;
}
......
Markdown is supported
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