Slight improvement to error messages in window.c