Revert "use screen width rather than window width"

This reverts commit 3e4426293cc3f37bcf007717888a992ac5d9b408.