diff options
author | Bernd Weimer <bernd.weimer@pelagicore.com> | 2015-08-20 10:30:44 +0200 |
---|---|---|
committer | Bernd Weimer <bernd.weimer@pelagicore.com> | 2015-08-25 10:05:34 +0000 |
commit | 87499ddd653fb20796c2dd2eabac37b45240ef1c (patch) | |
tree | ddfa0d259348e1f076fba4801aa06c6f30ee5def /src | |
parent | 6d77b758cf4d2db7722eeb46af573921428771f2 (diff) | |
download | qtwayland-87499ddd653fb20796c2dd2eabac37b45240ef1c.tar.gz qtwayland-87499ddd653fb20796c2dd2eabac37b45240ef1c.tar.bz2 qtwayland-87499ddd653fb20796c2dd2eabac37b45240ef1c.zip |
Enable input context selection
It was not possible to use a different input context than the platform
context. This has been unified across major platforms, depending on the
environment variable "QT_IM_MODULE", the following context is selected:
- null: default platform context (Wayland in this case)
- empty: no context
- set: set one, if it exists and is valid (otherwise no context)
Change-Id: I07c6fb339c434f99fc6e092a2e18f00600daa3bc
Reviewed-by: Nedim Hadzic <nedim.hadzic@pelagicore.com>
Reviewed-by: Jan Arne Petersen <jan.petersen@kdab.com>
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/client/qwaylandintegration.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp index 9526aec4..82df8a30 100644 --- a/src/client/qwaylandintegration.cpp +++ b/src/client/qwaylandintegration.cpp @@ -128,7 +128,9 @@ QWaylandIntegration::QWaylandIntegration() mClipboard = new QWaylandClipboard(mDisplay); mDrag = new QWaylandDrag(mDisplay); - mInputContext.reset(new QWaylandInputContext(mDisplay)); + QString icStr = QPlatformInputContextFactory::requested(); + icStr.isNull() ? mInputContext.reset(new QWaylandInputContext(mDisplay)) + : mInputContext.reset(QPlatformInputContextFactory::create(icStr)); } QWaylandIntegration::~QWaylandIntegration() |