Improved window system handling.