From b46fe39d940712c5d401e731e171a7ccfadfe648 Mon Sep 17 00:00:00 2001 From: Bernd Weimer Date: Mon, 23 Mar 2015 11:53:16 +0100 Subject: Harmonize input context selection Input context selection works differently across platforms. On some platforms it is not possible to request a specific context at all (e.g. Wayland). This will be unified, depending on the environment variable "QT_IM_MODULE", you will get: - null: default (platform) context, if defined (otherwise no context) - empty: no context - set: set one, if it exists and is valid (otherwise no context) [ChangeLog][Platform Specific Changes] Haromnized input context selection. QT_IM_MODULE environment variable will be taken into account. Change-Id: Ic8f826fbc6ace25941cd19b9b086943e848fbe01 Reviewed-by: Lars Knoll Reviewed-by: Nedim Hadzic --- src/plugins/platforms/xcb/qxcbintegration.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/plugins/platforms/xcb/qxcbintegration.cpp') diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp index fc06f1a7b0..9cedfa77ad 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.cpp +++ b/src/plugins/platforms/xcb/qxcbintegration.cpp @@ -268,7 +268,10 @@ void QXcbIntegration::initialize() { // Perform everything that may potentially need the event dispatcher (timers, socket // notifiers) here instead of the constructor. - m_inputContext.reset(QPlatformInputContextFactory::create()); + QString icStr = QPlatformInputContextFactory::requested(); + if (icStr.isNull()) + icStr = QLatin1String("compose"); + m_inputContext.reset(QPlatformInputContextFactory::create(icStr)); } void QXcbIntegration::moveToScreen(QWindow *window, int screen) -- cgit v1.2.3