summaryrefslogtreecommitdiff
path: root/src/w32term.c
diff options
context:
space:
mode:
authorKen Brown <kbrown@cornell.edu>2016-05-12 15:52:26 -0400
committerKen Brown <kbrown@cornell.edu>2016-05-12 15:52:26 -0400
commit6435f41f6d444243c87b7b52e5e7c0b5a40195ad (patch)
tree28f4ae0b8ffe047faea4198baba0ff8bb2b13baf /src/w32term.c
parentec7a173e03729450bb9117e98d7e696c15994a84 (diff)
downloademacs-6435f41f6d444243c87b7b52e5e7c0b5a40195ad.tar.gz
Autosave buffers on logout if HAVE_NTGUI
* src/w32fns.c (w32_wnd_proc): Pass a WM_ENDSESSION message on to w32_read_socket. * src/w32term.c (w32_read_socket): Create an event of type END_SESSION_EVENT if a WM_ENDSESSION message is received. * src/termhooks.h [HAVE_NTGUI]: New event kind END_SESSION_EVENT. * src/keyboard.c [HAVE_NTGUI] (syms_of_keyboard): New symbol `end-session'. (kbd_buffer_get_event): Return an end-session event if an event of type END_SESSION_EVENT is read. (keys_of_keyboard): Bind the end-session event to kill-emacs in special-event-map. (Bug#23483)
Diffstat (limited to 'src/w32term.c')
-rw-r--r--src/w32term.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/w32term.c b/src/w32term.c
index 74ea6b543bd..72e1245ae59 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -5260,6 +5260,10 @@ w32_read_socket (struct terminal *terminal,
}
break;
+ case WM_ENDSESSION:
+ inev.kind = END_SESSION_EVENT;
+ break;
+
case WM_INITMENU:
f = x_window_to_frame (dpyinfo, msg.msg.hwnd);