cursor/os-compatibility: move resizing into a separate function

Signed-off-by: Jan Beich <jbeich@FreeBSD.org>
2 jobs for master in 2 minutes and 27 seconds
Status Job ID Name Coverage
  Build
passed #1714042
build-native-autotools

00:02:27

passed #1714043
build-native-meson

00:00:44