summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbkeyboard.h
diff options
context:
space:
mode:
authorFrank Richter <frank.richter@dynardo.de>2017-05-29 12:07:13 +0200
committerGatis Paeglis <gatis.paeglis@qt.io>2018-01-04 19:47:53 +0000
commit3edcd9420e3ad661cad89420e18dbb70e7ad450b (patch)
treeee6b83e965ca0c1226add6448e95835afc52b284 /src/plugins/platforms/xcb/qxcbkeyboard.h
parent79dfc084375e52dde283e6b046b5894198e9f6a2 (diff)
Support legacy X11 keymaps
Not all X server vendors support the XKB protocol. Furthermore, while X.org seems to use keycodes that match the usual keyboard scancodes, other vendors may not do so. This means that using an XKB keymap suitable for an X.org server results in garbled input with servers for other vendors. Both of these issues are addressed by using the core keycode information as a fallback. [ChangeLog][X11] Fall back to X11 core keycode information if an XKB keymap could not be determined through the connection. Task-number: QTBUG-44938 Change-Id: I64568aa31113d5a3fd90f70c63320a497db21477 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbkeyboard.h')
-rw-r--r--src/plugins/platforms/xcb/qxcbkeyboard.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbkeyboard.h b/src/plugins/platforms/xcb/qxcbkeyboard.h
index 1e3e97d1ec..7ee8e9e90d 100644
--- a/src/plugins/platforms/xcb/qxcbkeyboard.h
+++ b/src/plugins/platforms/xcb/qxcbkeyboard.h
@@ -94,6 +94,9 @@ protected:
void readXKBConfig();
void clearXKBConfig();
+#if QT_CONFIG(xcb_xlib)
+ struct xkb_keymap *keymapFromCore();
+#endif
// when XKEYBOARD not present on the X server
void updateModifiers();
typedef QMap<xcb_keysym_t, int> KeysymModifierMap;
@@ -109,6 +112,7 @@ private:
void updateXKBStateFromState(struct xkb_state *kb_state, quint16 state);
bool m_config = false;
+ bool m_keymap_is_core = false;
xcb_keycode_t m_autorepeat_code = 0;
struct xkb_context *xkb_context = nullptr;