Mercurial > emacs
changeset 72647:3f73353559c2
(install_window_handler, mac_handle_window_event)
[USE_CARBON_EVENTS]: Handle kEventWindowClose.
[USE_MAC_TSM] (mac_handle_text_input_event): Set modifiers for
ASCII keystroke event.
author | YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
---|---|
date | Tue, 05 Sep 2006 01:03:09 +0000 |
parents | a906afc31a2f |
children | dccec68de80c |
files | src/macterm.c |
diffstat | 1 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/macterm.c Mon Sep 04 18:26:03 2006 +0000 +++ b/src/macterm.c Tue Sep 05 01:03:09 2006 +0000 @@ -9486,6 +9486,18 @@ break; + case kEventWindowClose: + { + struct input_event buf; + + EVENT_INIT (buf); + buf.kind = DELETE_WINDOW_EVENT; + XSETFRAME (buf.frame_or_window, mac_window_to_frame (wp)); + buf.arg = Qnil; + kbd_buffer_store_event (&buf); + } + return noErr; + #ifdef MAC_OSX case kEventWindowToolbarSwitchMode: result = CallNextEventHandler (next_handler, event); @@ -9775,6 +9787,8 @@ read_socket_inev->kind = ASCII_KEYSTROKE_EVENT; read_socket_inev->code = code; read_socket_inev->modifiers = + mac_to_emacs_modifiers (modifiers); + read_socket_inev->modifiers |= (extra_keyboard_modifiers & (meta_modifier | alt_modifier | hyper_modifier | super_modifier)); @@ -9899,6 +9913,7 @@ {kEventClassWindow, kEventWindowHidden}, {kEventClassWindow, kEventWindowExpanded}, {kEventClassWindow, kEventWindowCollapsed}, + {kEventClassWindow, kEventWindowClose}, #ifdef MAC_OSX {kEventClassWindow, kEventWindowToolbarSwitchMode}, #endif