diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/w32fns.c | 38 | ||||
| -rw-r--r-- | src/w32term.c | 2 | ||||
| -rw-r--r-- | src/xterm.c | 2 |
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, | |||
| 3540 | SHORT r = VkKeyScanW (*b), bitmap = 0x1FF; | 3540 | SHORT r = VkKeyScanW (*b), bitmap = 0x1FF; |
| 3541 | 3541 | ||
| 3542 | FPRINTF_WM_CHARS((stderr, "VkKeyScanW %#06x %#04x\n", (int)r, | 3542 | FPRINTF_WM_CHARS((stderr, "VkKeyScanW %#06x %#04x\n", (int)r, |
| 3543 | wParam)); | 3543 | wParam)); |
| 3544 | if ((r & 0xFF) == wParam) | 3544 | if ((r & 0xFF) == wParam) |
| 3545 | bitmap = r>>8; /* *b is reachable via simple interface */ | 3545 | bitmap = r>>8; /* *b is reachable via simple interface */ |
| 3546 | else | ||
| 3547 | { | ||
| 3548 | /* VkKeyScanW() (essentially) returns the FIRST key with | ||
| 3549 | the specified character; so here the pressed key is the | ||
| 3550 | SECONDARY key producing the character. | ||
| 3551 | |||
| 3552 | Essentially, we have no information about the "role" of | ||
| 3553 | modifiers on this key: which contribute into the | ||
| 3554 | produced character (so "are consumed"), and which are | ||
| 3555 | "extra" (must attache to bindable events). | ||
| 3556 | |||
| 3557 | The default above would consume ALL modifiers, so the | ||
| 3558 | character is reported "as is". However, on many layouts | ||
| 3559 | the ordering of the keys (in the layout table) is not | ||
| 3560 | thought out well, so the "secondary" keys are often those | ||
| 3561 | which the users would prefer to use with Alt-CHAR. | ||
| 3562 | (Moreover - with e.g. Czech-QWERTY - the ASCII | ||
| 3563 | punctuation is accessible from two equally [nu]preferable | ||
| 3564 | AltGr-keys.) | ||
| 3565 | |||
| 3566 | SO: Heuristic: if the reported char is ASCII, AND Meta | ||
| 3567 | modifier is a candidate, behave as if Meta is present | ||
| 3568 | (fallback to the legacy branch; bug#23251). | ||
| 3569 | |||
| 3570 | (This would break layouts | ||
| 3571 | - delivering ASCII characters | ||
| 3572 | - on SECONDARY keys | ||
| 3573 | - with not Shift/AltGr-like modifier combinations. | ||
| 3574 | All 3 conditions together must be pretty exotic | ||
| 3575 | cases - and a workaround exists: use "primary" keys!) */ | ||
| 3576 | if (*b < 0x80 | ||
| 3577 | && (wmsg.dwModifiers | ||
| 3578 | & (alt_modifier | meta_modifier | ||
| 3579 | | super_modifier | hyper_modifier))) | ||
| 3580 | return 0; | ||
| 3581 | } | ||
| 3546 | if (*type_CtrlAlt == 'a') /* Simple Alt seen */ | 3582 | if (*type_CtrlAlt == 'a') /* Simple Alt seen */ |
| 3547 | { | 3583 | { |
| 3548 | if ((bitmap & ~1) == 0) /* 1: KBDSHIFT */ | 3584 | 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, | |||
| 6245 | } | 6245 | } |
| 6246 | 6246 | ||
| 6247 | unblock_input (); | 6247 | unblock_input (); |
| 6248 | |||
| 6249 | do_pending_window_change (false); | ||
| 6248 | } | 6250 | } |
| 6249 | 6251 | ||
| 6250 | /* Mouse warping. */ | 6252 | /* 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, | |||
| 10742 | cancel_mouse_face (f); | 10742 | cancel_mouse_face (f); |
| 10743 | 10743 | ||
| 10744 | unblock_input (); | 10744 | unblock_input (); |
| 10745 | |||
| 10746 | do_pending_window_change (false); | ||
| 10745 | } | 10747 | } |
| 10746 | 10748 | ||
| 10747 | /* Move the mouse to position pixel PIX_X, PIX_Y relative to frame F. */ | 10749 | /* Move the mouse to position pixel PIX_X, PIX_Y relative to frame F. */ |