diff options
author | Marco Martin <mart@kde.org> | 2015-06-12 08:18:24 -0700 |
---|---|---|
committer | Robin Burchell <robin.burchell@viroteck.net> | 2015-08-20 09:36:00 +0000 |
commit | ab3a883300dd66e96418618eb981d513844a0d3c (patch) | |
tree | e6d7c90f6b904bc058eb4b6c470dc38b0cff48ca /src/client/qwaylandintegration.cpp | |
parent | 6d77b758cf4d2db7722eeb46af573921428771f2 (diff) |
Fallback to normal input method plugins
wl_text_input is still a weston-specific extension. other compositors
just expect the normal input context plugins to be instantiated when the
wayland client connects.
now try to use the one based upon wl_text_input, if fails fallback to
the QPlatformInputContextFactory::create() route
Change-Id: I034acf9ed19c766250f81fc5648d0318ae45f1bf
Reviewed-by: Giulio Camuffo <giulio.camuffo@jollamobile.com>
Diffstat (limited to 'src/client/qwaylandintegration.cpp')
-rw-r--r-- | src/client/qwaylandintegration.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp index 9526aec4c..c8d121766 100644 --- a/src/client/qwaylandintegration.cpp +++ b/src/client/qwaylandintegration.cpp @@ -128,7 +128,15 @@ QWaylandIntegration::QWaylandIntegration() mClipboard = new QWaylandClipboard(mDisplay); mDrag = new QWaylandDrag(mDisplay); - mInputContext.reset(new QWaylandInputContext(mDisplay)); + //try to use the input context using the wl_text_input interface + QPlatformInputContext *ctx = new QWaylandInputContext(mDisplay); + mInputContext.reset(ctx); + + //use the traditional way for on screen keyboards for now + if (!mInputContext.data()->isValid()) { + ctx = QPlatformInputContextFactory::create(); + mInputContext.reset(ctx); + } } QWaylandIntegration::~QWaylandIntegration() |