Improve emacs function for updating win property

If graphical display is not checked, emacs clients for "emacs --daemon"
running in terminals do not work giving an error "Non-X frame used".