diff options
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbintegration.cpp')
-rw-r--r-- | src/plugins/platforms/xcb/qxcbintegration.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/plugins/platforms/xcb/qxcbintegration.cpp b/src/plugins/platforms/xcb/qxcbintegration.cpp index 984c8afb9d..fcc17b28b2 100644 --- a/src/plugins/platforms/xcb/qxcbintegration.cpp +++ b/src/plugins/platforms/xcb/qxcbintegration.cpp @@ -71,6 +71,11 @@ #include <QtPlatformSupport/private/qeglplatformcontext_p.h> #endif +#define XCB_USE_IBUS +#if defined(XCB_USE_IBUS) +#include "QtPlatformSupport/qibusplatforminputcontext.h" +#endif + QXcbIntegration::QXcbIntegration() : m_connection(new QXcbConnection), m_printerSupport(new QGenericUnixPrinterSupport) { @@ -79,6 +84,8 @@ QXcbIntegration::QXcbIntegration() m_fontDatabase = new QGenericUnixFontDatabase(); m_nativeInterface = new QXcbNativeInterface; + + m_inputContext = 0; } QXcbIntegration::~QXcbIntegration() @@ -141,6 +148,11 @@ QAbstractEventDispatcher *QXcbIntegration::createEventDispatcher() const { QAbstractEventDispatcher *eventDispatcher = createUnixEventDispatcher(); m_connection->setEventDispatcher(eventDispatcher); +#ifdef XCB_USE_IBUS + // A bit hacky to do this here, but we need an eventloop before we can instantiate + // the input context. + const_cast<QXcbIntegration *>(this)->m_inputContext = new QIBusPlatformInputContext; +#endif return eventDispatcher; } @@ -318,3 +330,8 @@ QPlatformDrag *QXcbIntegration::drag() const { return m_connection->drag(); } + +QPlatformInputContext *QXcbIntegration::inputContext() const +{ + return m_inputContext; +} |