window.c: Formatting, warnings fixes