Use window size callback to dynamically adapt the window size.