summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbintegration.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2017-06-12 13:33:46 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2017-07-31 10:35:11 +0000
commit286c53f217d5a8d634cb2b8c08d2c5a3db67158b (patch)
tree49db8879319ebec2d0c9f1f68322c83f2588e9c1 /src/plugins/platforms/xcb/qxcbintegration.cpp
parent256854cf9760f2b8e8702c2ce2066f67213c0169 (diff)
Fix composition on xcb with misconfigured ibus
If ibus has been set, but either isn't installed or doesn't launch, all composition fails on xcb. This ensures we fallback to "compose" which is needed for working composition on XCB. Change-Id: Ic2061c330bcb907759a13920c3eede14f3036563 Reviewed-by: René J.V. Bertin <rjvbertin@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbintegration.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbintegration.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp
index 859b55b0d8..b372ecd7c4 100644
--- a/src/plugins/platforms/xcb/qxcbintegration.cpp
+++ b/src/plugins/platforms/xcb/qxcbintegration.cpp
@@ -289,12 +289,15 @@ QAbstractEventDispatcher *QXcbIntegration::createEventDispatcher() const
void QXcbIntegration::initialize()
{
+ const QLatin1String defaultInputContext("compose");
// Perform everything that may potentially need the event dispatcher (timers, socket
// notifiers) here instead of the constructor.
QString icStr = QPlatformInputContextFactory::requested();
if (icStr.isNull())
- icStr = QLatin1String("compose");
+ icStr = defaultInputContext;
m_inputContext.reset(QPlatformInputContextFactory::create(icStr));
+ if (!m_inputContext && icStr != defaultInputContext && icStr != QLatin1String("none"))
+ m_inputContext.reset(QPlatformInputContextFactory::create(defaultInputContext));
}
void QXcbIntegration::moveToScreen(QWindow *window, int screen)