diff src/event-Xt.c @ 4780:2fd201d73a92

Call character_to_event on characters received from XIM, event-Xt.c src/ChangeLog addition: 2009-12-17 Aidan Kehoe <kehoea@parhasard.net> * events.h (character_to_event_meta_behavior): New enumeration, describing what character_to_event should do with characters in the range ?\x80-?\xFF, and passed as the third argument to character_to_event instead of the binary use_console_meta_flag. * events.c (character_to_event, Fcharacter_to_event): * event-unixoid.c (read_event_from_tty_or_stream_desc): * event-stream.c (maybe_kbd_translate, maybe_kbd_translate): * event-msw.c (mswindows_need_event): Use the new enumeration. * event-Xt.c (x_to_emacs_keysym): Call character_to_event when we receive XLookupChars events, passing latin_1_maps_to_itself as the meta_behavior flag, addressing the problem FKtPp sees in 87bpi9mwpu.fsf@yahoo.com.cn
author Aidan Kehoe <kehoea@parhasard.net>
date Thu, 17 Dec 2009 17:51:38 +0000
parents 726060ee587c
children bc4f2511bbea
line wrap: on
line diff
--- a/src/event-Xt.c	Thu Dec 17 17:29:32 2009 +0000
+++ b/src/event-Xt.c	Thu Dec 17 17:51:38 2009 +0000
@@ -967,10 +967,12 @@
             Lisp_Object emacs_event = Fmake_event (Qnil, Qnil);
 	    Lisp_Event *ev          = XEVENT (emacs_event);
             ev->channel	            = DEVICE_CONSOLE (d);
+	    XSET_EVENT_TYPE (emacs_event, key_press_event);
+	    /* Make sure space and linefeed and so on get the proper
+	       keysyms. */
+	    character_to_event (ch, ev, XCONSOLE (ev->channel),
+				latin_1_maps_to_itself, 0);
             ev->timestamp	    = event->time;
-	    XSET_EVENT_TYPE (emacs_event, key_press_event);
-	    XSET_EVENT_KEY_MODIFIERS (emacs_event, 0);
-	    XSET_EVENT_KEY_KEYSYM (emacs_event, make_char (ch));
             enqueue_dispatch_event (emacs_event);
           }
 	Lstream_close (istr);