Changeset View
Changeset View
Standalone View
Standalone View
tests/xdgtest.cpp
Show First 20 Lines • Show All 115 Lines • ▼ Show 20 Line(s) | 115 | connect(registry, &Registry::interfacesAnnounced, this, | |||
---|---|---|---|---|---|
116 | [this] { | 116 | [this] { | ||
117 | Q_ASSERT(m_compositor); | 117 | Q_ASSERT(m_compositor); | ||
118 | Q_ASSERT(m_xdgShell); | 118 | Q_ASSERT(m_xdgShell); | ||
119 | Q_ASSERT(m_shm); | 119 | Q_ASSERT(m_shm); | ||
120 | m_surface = m_compositor->createSurface(this); | 120 | m_surface = m_compositor->createSurface(this); | ||
121 | Q_ASSERT(m_surface); | 121 | Q_ASSERT(m_surface); | ||
122 | m_xdgShellSurface = m_xdgShell->createSurface(m_surface, this); | 122 | m_xdgShellSurface = m_xdgShell->createSurface(m_surface, this); | ||
123 | Q_ASSERT(m_xdgShellSurface); | 123 | Q_ASSERT(m_xdgShellSurface); | ||
124 | connect(m_xdgShellSurface, &XdgShellSurface::sizeChanged, this, &XdgTest::render); | 124 | connect(m_xdgShellSurface, &XdgShellSurface::configureRequested, this, [this](const QSize &size, KWayland::Client::XdgShellSurface::States states, int serial) { | ||
125 | Q_UNUSED(size); | ||||
126 | Q_UNUSED(states); | ||||
127 | m_xdgShellSurface->ackConfigure(serial); | ||||
125 | render(); | 128 | render(); | ||
129 | }); | ||||
zzag: I had to use QStringLiteral to make it compile. | |||||
130 | | ||||
131 | m_xdgShellSurface->setTitle(QStringLiteral("Test Window")); | ||||
132 | | ||||
133 | m_surface->commit(); | ||||
zzag: Q_UNUSED(size)
Q_UNUSED(states) | |||||
126 | } | 134 | } | ||
127 | ); | 135 | ); | ||
128 | connect(registry, &Registry::seatAnnounced, this, | 136 | connect(registry, &Registry::seatAnnounced, this, | ||
129 | [this, registry](quint32 name) { | 137 | [this, registry](quint32 name) { | ||
130 | Seat *s = registry->createSeat(name, 2, this); | 138 | Seat *s = registry->createSeat(name, 2, this); | ||
131 | connect(s, &Seat::hasPointerChanged, this, | 139 | connect(s, &Seat::hasPointerChanged, this, | ||
132 | [this, s](bool has) { | 140 | [this, s](bool has) { | ||
133 | if (!has) { | 141 | if (!has) { | ||
▲ Show 20 Lines • Show All 86 Lines • Show Last 20 Lines |
I had to use QStringLiteral to make it compile.