summaryrefslogtreecommitdiffstats
path: root/src/client/qwaylanddisplay.cpp
diff options
context:
space:
mode:
authorJan Arne Petersen <jan.petersen@kdab.com>2015-12-30 00:08:17 +0100
committerGiulio Camuffo <giulio.camuffo@kdab.com>2016-04-18 11:39:14 +0000
commit5444ea50bb2b1b894d5b3c33676f9ef207fdcd1a (patch)
tree72ca3e6b3f6530ffe16795a96a717b5666cd5284 /src/client/qwaylanddisplay.cpp
parent68f40f95972b857433df424cc16809eebfd77b8f (diff)
Fix text-input support for new API
Update text input support to upstream text-input protocol v2 from wayland-protocols. Remove support for input-method protocol for now. Map text-input protocol on compositor side to the Qt input method API, this allows to use any qt platform input method on compositor side (especially qtvirtualkeyboard). Add support for qtvirtualkeyboard to pure-qml example. Implement all missing functions of the text-input protocol. Change-Id: I597451ff65454a63dff86026b6a8d1ffbe07ce02 Done-with: Zeno Endemann <zeno.endemann@kdab.com> Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
Diffstat (limited to 'src/client/qwaylanddisplay.cpp')
-rw-r--r--src/client/qwaylanddisplay.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp
index 7244363cd..a18b9853f 100644
--- a/src/client/qwaylanddisplay.cpp
+++ b/src/client/qwaylanddisplay.cpp
@@ -50,6 +50,7 @@
#include "qwaylandxdgshell_p.h"
#include "qwaylandxdgsurface_p.h"
#include "qwaylandwlshellsurface_p.h"
+#include "qwaylandinputcontext_p.h"
#include "qwaylandwindowmanagerintegration_p.h"
#include "qwaylandshellintegration_p.h"
@@ -60,7 +61,7 @@
#include "qwaylandtouch_p.h"
#include "qwaylandqtkey_p.h"
-#include <QtWaylandClient/private/qwayland-text.h>
+#include <QtWaylandClient/private/qwayland-text-input-unstable-v2.h>
#include <QtWaylandClient/private/qwayland-xdg-shell.h>
#include <QtCore/QAbstractEventDispatcher>
@@ -281,8 +282,11 @@ void QWaylandDisplay::registry_global(uint32_t id, const QString &interface, uin
mTouchExtension.reset(new QWaylandTouchExtension(this, id));
} else if (interface == QStringLiteral("qt_key_extension")) {
mQtKeyExtension.reset(new QWaylandQtKeyExtension(this, id));
- } else if (interface == QStringLiteral("wl_text_input_manager")) {
- mTextInputManager.reset(new QtWayland::wl_text_input_manager(registry, id, 1));
+ } else if (interface == QStringLiteral("zwp_text_input_manager_v2")) {
+ mTextInputManager.reset(new QtWayland::zwp_text_input_manager_v2(registry, id, 1));
+ foreach (QWaylandInputDevice *inputDevice, mInputDevices) {
+ inputDevice->setTextInput(new QWaylandTextInput(this, mTextInputManager->get_text_input(inputDevice->wl_seat())));
+ }
} else if (interface == QStringLiteral("qt_hardware_integration")) {
mHardwareIntegration.reset(new QWaylandHardwareIntegration(registry, id));
// make a roundtrip here since we need to receive the events sent by