Expression desc:onResize(f) is only available
when the surface descriptor corresponds to a window.
It ensures that function f(w,h) gets called
whenever the window size changes.
The function arguments w and h indicate the new window size.
Each call of desc:onResize replaces the
previous callback function by f.
Calling it with argument nil removes
the current callback.