diff options
author | Gatis Paeglis <gatis.paeglis@qt.io> | 2018-12-13 22:04:18 +0100 |
---|---|---|
committer | Gatis Paeglis <gatis.paeglis@qt.io> | 2019-04-15 14:10:34 +0000 |
commit | 4de344decf7db4d7703575a78d6013a5c776bf1e (patch) | |
tree | 0ca5b0667c6f7e182b79c674a7f49486a0a51f8b /src/client/qwaylanddisplay.cpp | |
parent | 3aedd01271dc4f4a13103d632df224971ab2b6df (diff) | |
download | qtwayland-4de344decf7db4d7703575a78d6013a5c776bf1e.tar.gz |
client: rework xkb context/keymap/state handling
- Use smart pointers from xkbcommon_support-private.
- Remove needless strdup() calls.
- Don't recreate context. And move it into qwaylanddisplay so it can
be shared in future between several keyboards. It contains things like
a logging level and include paths.
Change-Id: I5d1f667e710046e6b62aa2caf82fdb2decc24520
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
Diffstat (limited to 'src/client/qwaylanddisplay.cpp')
-rw-r--r-- | src/client/qwaylanddisplay.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp index 22a79124..e96e52fe 100644 --- a/src/client/qwaylanddisplay.cpp +++ b/src/client/qwaylanddisplay.cpp @@ -142,6 +142,12 @@ QWaylandDisplay::QWaylandDisplay(QWaylandIntegration *waylandIntegration) mWindowManagerIntegration.reset(new QWaylandWindowManagerIntegration(this)); +#if QT_CONFIG(xkbcommon) + mXkbContext.reset(xkb_context_new(XKB_CONTEXT_NO_FLAGS)); + if (!mXkbContext) + qCWarning(lcQpaWayland, "failed to create xkb context"); +#endif + forceRoundTrip(); } |