Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/shade_test.cpp
Show First 20 Lines • Show All 109 Lines • ▼ Show 20 Line(s) | 76 | { | |||
---|---|---|---|---|---|
110 | QVERIFY(client); | 110 | QVERIFY(client); | ||
111 | QCOMPARE(client->window(), w); | 111 | QCOMPARE(client->window(), w); | ||
112 | QVERIFY(client->isDecorated()); | 112 | QVERIFY(client->isDecorated()); | ||
113 | QVERIFY(client->isShadeable()); | 113 | QVERIFY(client->isShadeable()); | ||
114 | QVERIFY(!client->isShade()); | 114 | QVERIFY(!client->isShade()); | ||
115 | QVERIFY(client->isActive()); | 115 | QVERIFY(client->isActive()); | ||
116 | 116 | | |||
117 | // now shade the window | 117 | // now shade the window | ||
118 | const QRect geoBeforeShade = client->geometry(); | 118 | const QRect geoBeforeShade = client->frameGeometry(); | ||
119 | QVERIFY(geoBeforeShade.isValid()); | 119 | QVERIFY(geoBeforeShade.isValid()); | ||
120 | QVERIFY(!geoBeforeShade.isEmpty()); | 120 | QVERIFY(!geoBeforeShade.isEmpty()); | ||
121 | workspace()->slotWindowShade(); | 121 | workspace()->slotWindowShade(); | ||
122 | QVERIFY(client->isShade()); | 122 | QVERIFY(client->isShade()); | ||
123 | QVERIFY(client->geometry() != geoBeforeShade); | 123 | QVERIFY(client->frameGeometry() != geoBeforeShade); | ||
124 | // and unshade again | 124 | // and unshade again | ||
125 | workspace()->slotWindowShade(); | 125 | workspace()->slotWindowShade(); | ||
126 | QVERIFY(!client->isShade()); | 126 | QVERIFY(!client->isShade()); | ||
127 | QCOMPARE(client->geometry(), geoBeforeShade); | 127 | QCOMPARE(client->frameGeometry(), geoBeforeShade); | ||
128 | 128 | | |||
129 | // and destroy the window again | 129 | // and destroy the window again | ||
130 | xcb_unmap_window(c.data(), w); | 130 | xcb_unmap_window(c.data(), w); | ||
131 | xcb_destroy_window(c.data(), w); | 131 | xcb_destroy_window(c.data(), w); | ||
132 | xcb_flush(c.data()); | 132 | xcb_flush(c.data()); | ||
133 | c.reset(); | 133 | c.reset(); | ||
134 | 134 | | |||
135 | QSignalSpy windowClosedSpy(client, &X11Client::windowClosed); | 135 | QSignalSpy windowClosedSpy(client, &X11Client::windowClosed); | ||
136 | QVERIFY(windowClosedSpy.isValid()); | 136 | QVERIFY(windowClosedSpy.isValid()); | ||
137 | QVERIFY(windowClosedSpy.wait()); | 137 | QVERIFY(windowClosedSpy.wait()); | ||
138 | } | 138 | } | ||
139 | 139 | | |||
140 | } | 140 | } | ||
141 | 141 | | |||
142 | WAYLANDTEST_MAIN(KWin::ShadeTest) | 142 | WAYLANDTEST_MAIN(KWin::ShadeTest) | ||
143 | #include "shade_test.moc" | 143 | #include "shade_test.moc" |