@@ -32,42 +32,18 @@ GenericApp::GenericApp(const QString& name,
3232 : MirSurfaceItem(name, type, state, screenshot, qmlFilePath, parent)
3333 , m_touchPressCount(0)
3434 , m_touchReleaseCount(0)
35− , m_requestedInputMethod(false)
3635{
37− connect(this, &QQuickItem::activeFocusChanged,
38− this, &GenericApp::onActiveFocusChanged);
3936}
4037
4138GenericApp::~GenericApp()
4239{
4340}
4441
45−void GenericApp::onActiveFocusChanged()
46−{
47− if (hasActiveFocus()) {
48− if (m_requestedInputMethod) {
49− Q_EMIT inputMethodRequested();
50− }
51− } else {
52− Q_EMIT inputMethodDismissed();
53− }
54−}
55−
5642void GenericApp::touchEvent(QTouchEvent * event)
5743{
5844 if (event->touchPointStates() & Qt::TouchPointPressed) {
5945 ++m_touchPressCount;
6046 Q_EMIT touchPressCountChanged(m_touchPressCount);
61−
62− if (hasActiveFocus()) {
63− if (m_requestedInputMethod) {
64− Q_EMIT inputMethodDismissed();
65− } else {
66− Q_EMIT inputMethodRequested();
67− }
68− m_requestedInputMethod = !m_requestedInputMethod;
69− }
70−
7147 } else if (event->touchPointStates() & Qt::TouchPointReleased) {
7248 ++m_touchReleaseCount;
7349 Q_EMIT touchReleaseCountChanged(m_touchReleaseCount);