From 92e0357fefc06bb230969e50b6fbcc2c37076f20 Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Mon, 10 May 2021 18:06:29 +0200 Subject: [PATCH] InputMethodTest: provide a process to launch when we need a virtual keyboard Otherwise it never claims to be active. --- autotests/integration/emptywindow.qml | 16 ++++++++++++++++ autotests/integration/inputmethod_test.cpp | 2 +- 2 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 autotests/integration/emptywindow.qml diff --git a/autotests/integration/emptywindow.qml b/autotests/integration/emptywindow.qml new file mode 100644 index 0000000000..21a35c696f --- /dev/null +++ b/autotests/integration/emptywindow.qml @@ -0,0 +1,16 @@ +/* + KWin - the KDE window manager + This file is part of the KDE project. + + SPDX-FileCopyrightText: 2021 Aleix Pol Gonzalez + + SPDX-License-Identifier: GPL-2.0-or-later +*/ + +import QtQuick.Controls 2.0 + +ApplicationWindow +{ + visible: true + title: "Banana" +} diff --git a/autotests/integration/inputmethod_test.cpp b/autotests/integration/inputmethod_test.cpp index 37713d25bb..53803d08cb 100644 --- a/autotests/integration/inputmethod_test.cpp +++ b/autotests/integration/inputmethod_test.cpp @@ -68,7 +68,7 @@ void InputMethodTest::initTestCase() QVERIFY(waylandServer()->init(s_socketName)); QMetaObject::invokeMethod(kwinApp()->platform(), "setVirtualOutputs", Qt::DirectConnection, Q_ARG(int, 2)); - static_cast(kwinApp())->setInputMethodServerToStart("internal"); + static_cast(kwinApp())->setInputMethodServerToStart("qml " + QFINDTESTDATA("emptywindow.qml")); kwinApp()->start(); QVERIFY(applicationStartedSpy.wait()); QCOMPARE(screens()->count(), 2);