aboutsummaryrefslogtreecommitdiffstats
path: root/src/w32term.c
diff options
context:
space:
mode:
authorEli Zaretskii2012-06-23 15:39:23 +0300
committerEli Zaretskii2012-06-23 15:39:23 +0300
commit0bd8297f9cee150f34cbab14c71825d21d7bf91c (patch)
tree16a94bc4ac8fa7ea10b3de78584695a3d364487d /src/w32term.c
parent63def6b6d1acb18d90c705687359edd4f4c2f49a (diff)
downloademacs-0bd8297f9cee150f34cbab14c71825d21d7bf91c.tar.gz
emacs-0bd8297f9cee150f34cbab14c71825d21d7bf91c.zip
Improve and document the language-change event on MS-Windows.
src/keyboard.c (kbd_buffer_get_event): Include the codepage and the language ID in the event parameters. src/w32term.c (w32_read_socket): Put the new keyboard codepage into event.code, not the obscure "character set ID". doc/lispref/commands.texi (Misc Events): Document the language-change event.
Diffstat (limited to 'src/w32term.c')
-rw-r--r--src/w32term.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/w32term.c b/src/w32term.c
index 6a4b3ca4afb..4f4fa220a7b 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -4234,8 +4234,8 @@ w32_read_socket (struct terminal *terminal, int expected,
4234 /* Generate a language change event. */ 4234 /* Generate a language change event. */
4235 f = x_window_to_frame (dpyinfo, msg.msg.hwnd); 4235 f = x_window_to_frame (dpyinfo, msg.msg.hwnd);
4236 4236
4237 /* lParam contains the input lang ID. Use it to update our 4237 /* lParam contains the input language ID in its low 16 bits.
4238 record of the keyboard codepage. */ 4238 Use it to update our record of the keyboard codepage. */
4239 keyboard_codepage = codepage_for_locale ((LCID)(msg.msg.lParam 4239 keyboard_codepage = codepage_for_locale ((LCID)(msg.msg.lParam
4240 & 0xffff)); 4240 & 0xffff));
4241 4241
@@ -4243,7 +4243,7 @@ w32_read_socket (struct terminal *terminal, int expected,
4243 { 4243 {
4244 inev.kind = LANGUAGE_CHANGE_EVENT; 4244 inev.kind = LANGUAGE_CHANGE_EVENT;
4245 XSETFRAME (inev.frame_or_window, f); 4245 XSETFRAME (inev.frame_or_window, f);
4246 inev.code = msg.msg.wParam; 4246 inev.code = keyboard_codepage;
4247 inev.modifiers = msg.msg.lParam & 0xffff; 4247 inev.modifiers = msg.msg.lParam & 0xffff;
4248 } 4248 }
4249 break; 4249 break;