diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-10-15 09:07:48 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-10-15 09:07:48 +0200 |
commit | b3eba26e6f1de63b1de39e1895eb081b45250325 (patch) | |
tree | 55dea47c2ed0fd261ce76031aebd7123e236a125 /src/client/qwaylandintegration.cpp | |
parent | a64dcb7416fd5c0100ad176adf26f30b826cbfd6 (diff) | |
parent | a727ee0b2f1044ad8d5689208aed3f469b8de1ba (diff) |
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts:
src/client/qwaylandintegration.cpp
Change-Id: I29120f06d33c2d383a41cf35ca4a59f5d8548ad7
Diffstat (limited to 'src/client/qwaylandintegration.cpp')
-rw-r--r-- | src/client/qwaylandintegration.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp index c8d121766..407d90b94 100644 --- a/src/client/qwaylandintegration.cpp +++ b/src/client/qwaylandintegration.cpp @@ -128,14 +128,19 @@ QWaylandIntegration::QWaylandIntegration() mClipboard = new QWaylandClipboard(mDisplay); mDrag = new QWaylandDrag(mDisplay); - //try to use the input context using the wl_text_input interface - QPlatformInputContext *ctx = new QWaylandInputContext(mDisplay); - mInputContext.reset(ctx); - - //use the traditional way for on screen keyboards for now - if (!mInputContext.data()->isValid()) { - ctx = QPlatformInputContextFactory::create(); + QString icStr = QPlatformInputContextFactory::requested(); + if (!icStr.isNull()) { + mInputContext.reset(QPlatformInputContextFactory::create(icStr)); + } else { + //try to use the input context using the wl_text_input interface + QPlatformInputContext *ctx = new QWaylandInputContext(mDisplay); mInputContext.reset(ctx); + + //use the traditional way for on screen keyboards for now + if (!mInputContext.data()->isValid()) { + ctx = QPlatformInputContextFactory::create(); + mInputContext.reset(ctx); + } } } |