added macos directive to make it set the window bounds too.