add ioctl() to set window size