Merge setCanvasSize() with constructor. This should solve a problem on linux where an extra blank window was visible.