summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2016-04-24 12:48:34 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2016-04-24 12:48:34 -0700
commitf7794460e8e9e0c514b0cb01dd010b531c21169c (patch)
tree4bc195ab38f3e0e106b21b02d080be558ba80b33 /src
parente6d6a99455183bca5074b7601ad11d424da6442e (diff)
parent78f9af707f711121ba24d8dce88d6757683a4dfe (diff)
Merge from origin/emacs-25
78f9af7 ; ChangeLog fixes 162e549 * admin/authors.el (authors-ignored-files): Additions. 2b31a0c In x_set_window_size restore do_pending_window_change calls 401857e Fix Alt-modified keys on some European MS-Windows keyboards a77cf24 Document 'help-go-forward' 1ba947f Revert "Allow to customize names of executables used by grep.el" 570e0fa Revert "Don't use 'find-program'" 645f4ef Revert "Use 'grep-find-program' in check-declare.el" aa03257 Clarify documentation of 'dired-mark-files-containing-regexp' ce0d8c7 Make tmm-menubar work in correct order again b8d5a8f Remove the Meta-CVS VC backend
Diffstat (limited to 'src')
-rw-r--r--src/w32fns.c38
-rw-r--r--src/w32term.c2
-rw-r--r--src/xterm.c2
3 files changed, 41 insertions, 1 deletions
diff --git a/src/w32fns.c b/src/w32fns.c
index 111f1fb6562..ede8f6be292 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -3540,9 +3540,45 @@ deliver_wm_chars (int do_translate, HWND hwnd, UINT msg, UINT wParam,
SHORT r = VkKeyScanW (*b), bitmap = 0x1FF;
FPRINTF_WM_CHARS((stderr, "VkKeyScanW %#06x %#04x\n", (int)r,
- wParam));
+ wParam));
if ((r & 0xFF) == wParam)
bitmap = r>>8; /* *b is reachable via simple interface */
+ else
+ {
+ /* VkKeyScanW() (essentially) returns the FIRST key with
+ the specified character; so here the pressed key is the
+ SECONDARY key producing the character.
+
+ Essentially, we have no information about the "role" of
+ modifiers on this key: which contribute into the
+ produced character (so "are consumed"), and which are
+ "extra" (must attache to bindable events).
+
+ The default above would consume ALL modifiers, so the
+ character is reported "as is". However, on many layouts
+ the ordering of the keys (in the layout table) is not
+ thought out well, so the "secondary" keys are often those
+ which the users would prefer to use with Alt-CHAR.
+ (Moreover - with e.g. Czech-QWERTY - the ASCII
+ punctuation is accessible from two equally [nu]preferable
+ AltGr-keys.)
+
+ SO: Heuristic: if the reported char is ASCII, AND Meta
+ modifier is a candidate, behave as if Meta is present
+ (fallback to the legacy branch; bug#23251).
+
+ (This would break layouts
+ - delivering ASCII characters
+ - on SECONDARY keys
+ - with not Shift/AltGr-like modifier combinations.
+ All 3 conditions together must be pretty exotic
+ cases - and a workaround exists: use "primary" keys!) */
+ if (*b < 0x80
+ && (wmsg.dwModifiers
+ & (alt_modifier | meta_modifier
+ | super_modifier | hyper_modifier)))
+ return 0;
+ }
if (*type_CtrlAlt == 'a') /* Simple Alt seen */
{
if ((bitmap & ~1) == 0) /* 1: KBDSHIFT */
diff --git a/src/w32term.c b/src/w32term.c
index 8955ce26b4b..74ea6b543bd 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -6245,6 +6245,8 @@ x_set_window_size (struct frame *f, bool change_gravity,
}
unblock_input ();
+
+ do_pending_window_change (false);
}
/* Mouse warping. */
diff --git a/src/xterm.c b/src/xterm.c
index 7108207f257..28856cfe192 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -10742,6 +10742,8 @@ x_set_window_size (struct frame *f, bool change_gravity,
cancel_mouse_face (f);
unblock_input ();
+
+ do_pending_window_change (false);
}
/* Move the mouse to position pixel PIX_X, PIX_Y relative to frame F. */