aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2019-04-02 16:07:34 +0200
committerMichal Klocek <michal.klocek@qt.io>2019-04-15 07:53:58 +0000
commit7ded77dda5a050db7064430d1a45948bca8194ab (patch)
tree6168f35a1b244663d825bd71f95cc96d57a52881 /tests/auto
parent6dac2e7df7fbf0f29667bf92b4e72426db47dbe9 (diff)
Quick fix for not working input handling for eglfs
On eglfs platform input events are driven by libinput and do not have window information as such. They are simply delivered based on QGuiApplication::topLevelAt window selection. In case of WebEnigne, QQuickWindow is returned as top level window. QQuickWidget uses this QQuickWindow as an offscreen window, however since 561b932 we fake 'visible' and 'visibility' values so windows api in qml can use those properties. This ends up with broken event delivery on eglfs, since window is offscreen and therefore not really visible. Make a minimalistic change to fix the issue, without braking QTBUG-49054, which requires 'visibility' to have fake values, and 'visible' will keep window as not visible for event delivery system. Fix encapsulation of setVisible(), prevent accidental window creation when setVsiible() called from qml via binding. The proper fix would require for example adding some new flag to underlying offscreen window, which could be used by event window selection mechanism or rework of qquickwidget offscreen window parameters expose to qml. Task-number: QTBUG-65761 Task-number: QTBUG-49054 Change-Id: I2a307ee5613771adf6d31f1c3cc4b4a25d7620df Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp b/tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp
index aaf37b32cd..fd5c3653ad 100644
--- a/tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp
+++ b/tests/auto/quickwidgets/qquickwidget/tst_qquickwidget.cpp
@@ -161,7 +161,7 @@ void tst_qquickwidget::showHide()
window.show();
QVERIFY(QTest::qWaitForWindowExposed(&window));
- QVERIFY(childView->quickWindow()->isVisible());
+ QVERIFY(!childView->quickWindow()->isVisible()); // this window is always not visible see QTBUG-65761
QVERIFY(childView->quickWindow()->visibility() != QWindow::Hidden);
window.hide();
@@ -612,7 +612,7 @@ void tst_qquickwidget::synthMouseFromTouch()
childView->resize(300, 300);
window.show();
QVERIFY(QTest::qWaitForWindowActive(&window));
- QVERIFY(childView->quickWindow()->isVisible());
+ QVERIFY(!childView->quickWindow()->isVisible()); // this window is always not visible see QTBUG-65761
QVERIFY(item->isVisible());
QPoint p1 = QPoint(20, 20);