Lennart Borgman wrote:
Actually emacs recieve a control event instead, CTRL_LOGOFF_EVENT during my testing. (It could also be CTRL_SHUTDOWN_EVENT and probably CTRL_CLOSE_EVENT.) This event can be catched in ctrl_c_handler in w32console.c. I have tried that and then used PostThreadMessage (dwWindowsThreadId, WM_EMACS_KILL, 0, 0) to be able to call save-buffers-kill-emacs later on.
You can not run commands that require user interaction after receiving the CTRL_LOGOFF_EVENT. Windows will powerdown 10 seconds after the event is broadcast.


WM_EMACS_KILL seems ok to use here, it is not used anywhere else as far as I can see. It is passed on and shows up in w32_msg_pump. There I am trying to use my_post_msg to pass it to the lisp thread.
Wy not post it directly to the lisp thread in the first place?



_______________________________________________
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to