Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/internal_window.cpp
Show All 27 Lines | |||||
28 | #include "workspace.h" | 28 | #include "workspace.h" | ||
29 | 29 | | |||
30 | #include <QPainter> | 30 | #include <QPainter> | ||
31 | #include <QRasterWindow> | 31 | #include <QRasterWindow> | ||
32 | 32 | | |||
33 | #include <KWayland/Client/keyboard.h> | 33 | #include <KWayland/Client/keyboard.h> | ||
34 | #include <KWayland/Client/surface.h> | 34 | #include <KWayland/Client/surface.h> | ||
35 | #include <KWayland/Client/seat.h> | 35 | #include <KWayland/Client/seat.h> | ||
36 | #include <KWayland/Client/shell.h> | | |||
37 | #include <KWindowSystem> | 36 | #include <KWindowSystem> | ||
38 | 37 | | |||
39 | #include <KWayland/Server/surface_interface.h> | 38 | #include <KWayland/Server/surface_interface.h> | ||
40 | 39 | | |||
41 | #include <linux/input.h> | 40 | #include <linux/input.h> | ||
42 | 41 | | |||
43 | using namespace KWayland::Client; | 42 | using namespace KWayland::Client; | ||
44 | 43 | | |||
▲ Show 20 Lines • Show All 340 Lines • ▼ Show 20 Line(s) | 381 | { | |||
385 | QScopedPointer<Keyboard> keyboard(Test::waylandSeat()->createKeyboard()); | 384 | QScopedPointer<Keyboard> keyboard(Test::waylandSeat()->createKeyboard()); | ||
386 | QVERIFY(!keyboard.isNull()); | 385 | QVERIFY(!keyboard.isNull()); | ||
387 | QVERIFY(keyboard->isValid()); | 386 | QVERIFY(keyboard->isValid()); | ||
388 | QSignalSpy enteredSpy(keyboard.data(), &Keyboard::entered); | 387 | QSignalSpy enteredSpy(keyboard.data(), &Keyboard::entered); | ||
389 | QVERIFY(enteredSpy.isValid()); | 388 | QVERIFY(enteredSpy.isValid()); | ||
390 | QSignalSpy leftSpy(keyboard.data(), &Keyboard::left); | 389 | QSignalSpy leftSpy(keyboard.data(), &Keyboard::left); | ||
391 | QVERIFY(leftSpy.isValid()); | 390 | QVERIFY(leftSpy.isValid()); | ||
392 | QScopedPointer<Surface> surface(Test::createSurface()); | 391 | QScopedPointer<Surface> surface(Test::createSurface()); | ||
393 | QScopedPointer<QObject> shellSurface(Test::createShellSurface(Test::ShellSurfaceType::WlShell, surface.data())); | 392 | QScopedPointer<XdgShellSurface> shellSurface(Test::createXdgShellStableSurface(surface.data())); | ||
394 | 393 | | |||
395 | // now let's render | 394 | // now let's render | ||
396 | auto c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); | 395 | auto c = Test::renderAndWaitForShown(surface.data(), QSize(100, 50), Qt::blue); | ||
397 | QVERIFY(c); | 396 | QVERIFY(c); | ||
398 | QVERIFY(c->isActive()); | 397 | QVERIFY(c->isActive()); | ||
399 | QVERIFY(!c->isInternal()); | 398 | QVERIFY(!c->isInternal()); | ||
400 | 399 | | |||
401 | if (enteredSpy.isEmpty()) { | 400 | if (enteredSpy.isEmpty()) { | ||
▲ Show 20 Lines • Show All 397 Lines • Show Last 20 Lines |