mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-03-11 08:54:48 +00:00
Always sleep some time after the keymap has changed.
This works around a problem where sometimes chars are typed as if some random modifiers are pressed.
This commit is contained in:
parent
b86b640860
commit
2631277184
1 changed files with 8 additions and 7 deletions
|
|
@ -484,6 +484,14 @@ void AutoTypePlatformX11::updateKeymap()
|
|||
}
|
||||
}
|
||||
XFreeModifiermap(modifiers);
|
||||
|
||||
/* Xlib needs some time until the mapping is distributed to
|
||||
all clients */
|
||||
// TODO: we should probably only sleep while in the middle of typing something
|
||||
timespec ts;
|
||||
ts.tv_sec = 0;
|
||||
ts.tv_nsec = 30 * 1000 * 1000;
|
||||
nanosleep(&ts, Q_NULLPTR);
|
||||
}
|
||||
|
||||
bool AutoTypePlatformX11::isRemapKeycodeValid()
|
||||
|
|
@ -550,13 +558,6 @@ int AutoTypePlatformX11::AddKeysym(KeySym keysym)
|
|||
XFlush(m_dpy);
|
||||
updateKeymap();
|
||||
|
||||
/* Xlib needs some time until the mapping is distributed to
|
||||
all clients */
|
||||
timespec ts;
|
||||
ts.tv_sec = 0;
|
||||
ts.tv_nsec = 30 * 1000 * 1000;
|
||||
nanosleep(&ts, Q_NULLPTR);
|
||||
|
||||
return m_remapKeycode;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue