Changeset View
Changeset View
Standalone View
Standalone View
autotests/integration/scene_qpainter_shadow_test.cpp
Show All 31 Lines | |||||
32 | 32 | | |||
33 | #include <KDecoration2/Decoration> | 33 | #include <KDecoration2/Decoration> | ||
34 | #include <KDecoration2/DecorationShadow> | 34 | #include <KDecoration2/DecorationShadow> | ||
35 | 35 | | |||
36 | #include <KWayland/Client/server_decoration.h> | 36 | #include <KWayland/Client/server_decoration.h> | ||
37 | #include <KWayland/Client/shadow.h> | 37 | #include <KWayland/Client/shadow.h> | ||
38 | #include <KWayland/Client/shm_pool.h> | 38 | #include <KWayland/Client/shm_pool.h> | ||
39 | #include <KWayland/Client/surface.h> | 39 | #include <KWayland/Client/surface.h> | ||
40 | #include <KWayland/Server/shadow_interface.h> | 40 | #include <KWaylandServer/shadow_interface.h> | ||
41 | #include <KWayland/Server/surface_interface.h> | 41 | #include <KWaylandServer/surface_interface.h> | ||
42 | 42 | | |||
43 | #include "kwin_wayland_test.h" | 43 | #include "kwin_wayland_test.h" | ||
44 | 44 | | |||
45 | #include "abstract_client.h" | 45 | #include "abstract_client.h" | ||
46 | #include "composite.h" | 46 | #include "composite.h" | ||
47 | #include "effect_builtins.h" | 47 | #include "effect_builtins.h" | ||
48 | #include "effectloader.h" | 48 | #include "effectloader.h" | ||
49 | #include "effects.h" | 49 | #include "effects.h" | ||
▲ Show 20 Lines • Show All 698 Lines • ▼ Show 20 Line(s) | 689 | { | |||
748 | 748 | | |||
749 | Buffer::Ptr bufferLeft = shmPool->createBuffer( | 749 | Buffer::Ptr bufferLeft = shmPool->createBuffer( | ||
750 | referenceShadowTexture.copy(QRect(0, 128, 128, 1))); | 750 | referenceShadowTexture.copy(QRect(0, 128, 128, 1))); | ||
751 | clientShadow->attachLeft(bufferLeft); | 751 | clientShadow->attachLeft(bufferLeft); | ||
752 | 752 | | |||
753 | clientShadow->setOffsets(QMarginsF(128, 128, 128, 128)); | 753 | clientShadow->setOffsets(QMarginsF(128, 128, 128, 128)); | ||
754 | 754 | | |||
755 | // Commit shadow. | 755 | // Commit shadow. | ||
756 | QSignalSpy shadowChangedSpy(client->surface(), &KWayland::Server::SurfaceInterface::shadowChanged); | 756 | QSignalSpy shadowChangedSpy(client->surface(), &KWaylandServer::SurfaceInterface::shadowChanged); | ||
757 | QVERIFY(shadowChangedSpy.isValid()); | 757 | QVERIFY(shadowChangedSpy.isValid()); | ||
758 | clientShadow->commit(); | 758 | clientShadow->commit(); | ||
759 | surface->commit(Surface::CommitFlag::None); | 759 | surface->commit(Surface::CommitFlag::None); | ||
760 | QVERIFY(shadowChangedSpy.wait()); | 760 | QVERIFY(shadowChangedSpy.wait()); | ||
761 | 761 | | |||
762 | // Check whether we've got right shadow. | 762 | // Check whether we've got right shadow. | ||
763 | auto shadowIface = client->surface()->shadow(); | 763 | auto shadowIface = client->surface()->shadow(); | ||
764 | QVERIFY(!shadowIface.isNull()); | 764 | QVERIFY(!shadowIface.isNull()); | ||
Show All 16 Lines |