From e1a2dacb75a498c86a490f40e112ac3928f79a85 Mon Sep 17 00:00:00 2001 From: Bernd Weimer Date: Thu, 20 Aug 2015 10:30:44 +0200 Subject: [PATCH] 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 Reviewed-by: Jan Arne Petersen Reviewed-by: Giulio Camuffo --- src/plugins/platforms/wayland/qwaylandintegration.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/wayland/qwaylandintegration.cpp b/src/plugins/platforms/wayland/qwaylandintegration.cpp index 9526aec4c4e..82df8a30a41 100644 --- a/src/plugins/platforms/wayland/qwaylandintegration.cpp +++ b/src/plugins/platforms/wayland/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()