diff options
author | Jan Arne Petersen <jpetersen@openismus.com> | 2012-02-24 18:05:06 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-01 19:00:15 +0100 |
commit | 022ff04a6bb76f18b8b4d0a8bbcb2b21bd771546 (patch) | |
tree | bb44723c4c16bdc0fdf3c2b46b42af5ee30ced79 /tests/auto/gui/kernel/qwindow/tst_qwindow.cpp | |
parent | e51e7b851f6452ed19ae960179963559ab0b78ea (diff) |
Unset _NET_WM_USER_TIME_WINDOW before destroying the window
Otherwise metacity was crashing when a QWindow was destroyed immediately
after being activated, because metacity was trying to select events
(XSelectInput) for the already destroyed m_netWmUserTimeWindow.
Task-number: QTBUG-24492
Change-Id: Iedbe7bdd6b26110ca8bec6f33525209ae551ffd5
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'tests/auto/gui/kernel/qwindow/tst_qwindow.cpp')
-rw-r--r-- | tests/auto/gui/kernel/qwindow/tst_qwindow.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp index 90c96b4030..f4556f7e32 100644 --- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp +++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp @@ -64,6 +64,8 @@ private slots: void touchCancelWithTouchToMouse(); void orientation(); void close(); + void activateAndClose(); + void initTestCase() { touchDevice = new QTouchDevice; @@ -632,5 +634,16 @@ void tst_QWindow::close() QVERIFY(b.close()); } +void tst_QWindow::activateAndClose() +{ + for (int i = 0; i < 10; ++i) { + QWindow window; + window.show(); + QTest::qWaitForWindowShown(&window); + window.requestActivateWindow(); + QTRY_COMPARE(qGuiApp->focusWindow(), &window); + } +} + #include <tst_qwindow.moc> QTEST_MAIN(tst_QWindow); |