Allow the canvas to not fill the whole window

- Consider the offset that can be between the canvas and the window.
  The previous code matched the entire window.  But it was behaving
  bad if a toolbar or a header was added above the canvas.

- Make the canvas fill its parent element, not the entire window.