From a1af59e9dd8e3312db8f6843951c6e61e6dcfa01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sun, 23 Jul 2017 20:02:57 +0200 Subject: [PATCH] [autotests] Extend X11ClientTest::testFullscreenLayerWithActiveWaylandWindow Unfortunately still doesn't trigger the actual bug. --- autotests/integration/x11_client_test.cpp | 43 +++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/autotests/integration/x11_client_test.cpp b/autotests/integration/x11_client_test.cpp index 5d65bb2ac9..490a764308 100644 --- a/autotests/integration/x11_client_test.cpp +++ b/autotests/integration/x11_client_test.cpp @@ -202,6 +202,49 @@ void X11ClientTest::testFullscreenLayerWithActiveWaylandWindow() QCOMPARE(workspace()->stackingOrder().last(), waylandClient); QCOMPARE(workspace()->xStackingOrder().last(), waylandClient); + // back to x window + workspace()->activateClient(client); + QTRY_VERIFY(client->isActive()); + // remove fullscreen + QVERIFY(client->isFullScreen()); + workspace()->slotWindowFullScreen(); + QVERIFY(!client->isFullScreen()); + // and fullscreen again + workspace()->slotWindowFullScreen(); + QVERIFY(client->isFullScreen()); + QCOMPARE(workspace()->stackingOrder().last(), client); + QCOMPARE(workspace()->xStackingOrder().last(), client); + + // activate wayland window again + workspace()->activateClient(waylandClient); + QTRY_VERIFY(waylandClient->isActive()); + QCOMPARE(workspace()->stackingOrder().last(), waylandClient); + QCOMPARE(workspace()->xStackingOrder().last(), waylandClient); + + // back to X11 window + workspace()->activateClient(client); + QTRY_VERIFY(client->isActive()); + // remove fullscreen + QVERIFY(client->isFullScreen()); + workspace()->slotWindowFullScreen(); + QVERIFY(!client->isFullScreen()); + // and fullscreen through X API + NETWinInfo info(c.data(), w, kwinApp()->x11RootWindow(), NET::Properties(), NET::Properties2()); + info.setState(NET::FullScreen, NET::FullScreen); + NETRootInfo rootInfo(c.data(), NET::Properties()); + rootInfo.setActiveWindow(w, NET::FromApplication, XCB_CURRENT_TIME, XCB_WINDOW_NONE); + xcb_flush(c.data()); + QTRY_VERIFY(client->isFullScreen()); + QCOMPARE(workspace()->stackingOrder().last(), client); + QCOMPARE(workspace()->xStackingOrder().last(), client); + + // activate wayland window again + workspace()->activateClient(waylandClient); + QTRY_VERIFY(waylandClient->isActive()); + QCOMPARE(workspace()->stackingOrder().last(), waylandClient); + QCOMPARE(workspace()->xStackingOrder().last(), waylandClient); + QCOMPARE(client->layer(), NormalLayer); + // close the window shellSurface.reset(); surface.reset();