Basic window resize handling

Signed-off-by: Oleg Bulatov <oleg@bulatov.me>