Abide by the restrictions

The code in Listing 3 guarantees that the width of the window: