Minor SDL window fixes.

Fix issue #1426 and #1427.