mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-10 23:20:24 +01:00
XQuartz: Force a keymap resync on the first keypress to workaround XKB mucking with our keymap.
We need to find a better way to work with XKB on this.
(cherry picked from commit ceaa5c779c)
This commit is contained in:
parent
a7a499a48e
commit
11ea4b47c2
1 changed files with 11 additions and 0 deletions
|
|
@ -1181,6 +1181,17 @@ static inline int ensure_flag(int flags, int device_independent, int device_depe
|
|||
break;
|
||||
|
||||
case NSKeyDown: case NSKeyUp:
|
||||
{
|
||||
/* XKB clobbers our keymap at startup, so we need to force it on the first keypress.
|
||||
* TODO: Make this less of a kludge.
|
||||
*/
|
||||
static int force_resync_keymap = YES;
|
||||
if(force_resync_keymap) {
|
||||
DarwinSendDDXEvent(kXquartzReloadKeymap, 0);
|
||||
force_resync_keymap = NO;
|
||||
}
|
||||
}
|
||||
|
||||
if(darwinSyncKeymap) {
|
||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
|
||||
TISInputSourceRef key_layout = TISCopyCurrentKeyboardLayoutInputSource();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue