KWin
Loading...
Searching...
No Matches
Classes | Macros
test_xdg_shell.cpp File Reference
#include <QSignalSpy>
#include <QTest>
#include "KWayland/Client/compositor.h"
#include "KWayland/Client/connection_thread.h"
#include "KWayland/Client/event_queue.h"
#include "KWayland/Client/output.h"
#include "KWayland/Client/registry.h"
#include "KWayland/Client/seat.h"
#include "KWayland/Client/shm_pool.h"
#include "KWayland/Client/surface.h"
#include "KWayland/Client/xdgshell.h"
#include "wayland/compositor.h"
#include "wayland/display.h"
#include "wayland/output.h"
#include "wayland/seat.h"
#include "wayland/surface.h"
#include "wayland/xdgshell.h"
#include "../../../tests/fakeoutput.h"
#include "test_xdg_shell.moc"

Go to the source code of this file.

Classes

class  XdgShellTest
 

Macros

#define SURFACE
 
#define CLEANUP(variable)
 

Macro Definition Documentation

◆ CLEANUP

#define CLEANUP ( variable)
Value:
if (variable) { \
delete variable; \
variable = nullptr; \
}

◆ SURFACE

#define SURFACE
Value:
QSignalSpy xdgSurfaceCreatedSpy(m_xdgShellInterface, &XdgShellInterface::toplevelCreated); \
std::unique_ptr<KWayland::Client::Surface> surface(m_compositor->createSurface()); \
std::unique_ptr<KWayland::Client::XdgShellSurface> xdgSurface(m_xdgShell->createSurface(surface.get())); \
QCOMPARE(xdgSurface->size(), QSize()); \
QVERIFY(xdgSurfaceCreatedSpy.wait()); \
auto serverXdgToplevel = xdgSurfaceCreatedSpy.first().first().value<XdgToplevelInterface *>(); \
QVERIFY(serverXdgToplevel);
void toplevelCreated(XdgToplevelInterface *toplevel)

Definition at line 82 of file test_xdg_shell.cpp.