Hi Jack,
There are some problem spots in your code. There is a
g_signal_connect(window, "size-allocate", G_CALLBACK(resize_image), NULL);
in a loop and the resize_image function doesn't match the documentation.
https://developer.gnome.org/gtk3/stable/GtkWidget.html#GtkWidget-size-allocate
Thanks, Eric.
I must have arrived at my "fix" the same time you came up with your much
more elegant fix.
I did remove the sleep call. But my only other change was to change the
line in the call back
from
h = allocation->height;
to
h = allocation->height * 0.75;
I realized I was resizing the image