Likewise for on_resize.