This patch replaces global variable 'window-system-version' with the function which returns the window system version for the specified frame. I believe this is more reasonable, at least for the configuration which allows both TTY and X frames. Dmitry P.S. Are there the reasons to have both 'window-system' variable and function (except the possible backward compatibility with an old Lisp code)?