Jason Rumney wrote:
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.
No. Not if you return TRUE in ctrl_c_handler. I am however not sure what will happen next then. If Emacs exit directory after the call to save-all-buffers-kill-emacs, will the logoff continue then?



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?
Just because I am not sure about how to do that ;-)

Please tell me how to do that. Can I use post_msg / my_post_msg or something similar? Code is greatly appreciated!


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

Reply via email to