Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/internal_window.cpp
Show First 20 Lines • Show All 224 Lines • ▼ Show 20 Line(s) | 203 | { | |||
---|---|---|---|---|---|
225 | QVERIFY(enterSpy.isValid()); | 225 | QVERIFY(enterSpy.isValid()); | ||
226 | QSignalSpy leaveSpy(&win, &HelperWindow::left); | 226 | QSignalSpy leaveSpy(&win, &HelperWindow::left); | ||
227 | QVERIFY(leaveSpy.isValid()); | 227 | QVERIFY(leaveSpy.isValid()); | ||
228 | QSignalSpy moveSpy(&win, &HelperWindow::mouseMoved); | 228 | QSignalSpy moveSpy(&win, &HelperWindow::mouseMoved); | ||
229 | QVERIFY(moveSpy.isValid()); | 229 | QVERIFY(moveSpy.isValid()); | ||
230 | 230 | | |||
231 | quint32 timestamp = 1; | 231 | quint32 timestamp = 1; | ||
232 | kwinApp()->platform()->pointerMotion(QPoint(50, 50), timestamp++); | 232 | kwinApp()->platform()->pointerMotion(QPoint(50, 50), timestamp++); | ||
233 | QTRY_COMPARE(enterSpy.count(), 1); | 233 | QTRY_COMPARE(moveSpy.count(), 1); | ||
234 | 234 | | |||
235 | kwinApp()->platform()->pointerMotion(QPoint(60, 50), timestamp++); | 235 | kwinApp()->platform()->pointerMotion(QPoint(60, 50), timestamp++); | ||
236 | QTRY_COMPARE(moveSpy.count(), 1); | 236 | QTRY_COMPARE(moveSpy.count(), 2); | ||
237 | QCOMPARE(moveSpy.first().first().toPoint(), QPoint(60, 50)); | 237 | QCOMPARE(moveSpy[1].first().toPoint(), QPoint(60, 50)); | ||
238 | 238 | | |||
239 | kwinApp()->platform()->pointerMotion(QPoint(101, 50), timestamp++); | 239 | kwinApp()->platform()->pointerMotion(QPoint(101, 50), timestamp++); | ||
240 | QTRY_COMPARE(leaveSpy.count(), 1); | 240 | QTRY_COMPARE(leaveSpy.count(), 1); | ||
241 | 241 | | |||
242 | // set a mask on the window | 242 | // set a mask on the window | ||
243 | win.setMask(QRegion(10, 20, 30, 40)); | 243 | win.setMask(QRegion(10, 20, 30, 40)); | ||
244 | // outside the mask we should not get an enter | 244 | // outside the mask we should not get an enter | ||
245 | kwinApp()->platform()->pointerMotion(QPoint(5, 5), timestamp++); | 245 | kwinApp()->platform()->pointerMotion(QPoint(5, 5), timestamp++); | ||
▲ Show 20 Lines • Show All 432 Lines • Show Last 20 Lines |