Changeset View
Changeset View
Standalone View
Standalone View
autotests/client/test_drag_drop.cpp
Show First 20 Lines • Show All 181 Lines • ▼ Show 20 Line(s) | 171 | #undef DELETE | |||
---|---|---|---|---|---|
182 | m_display = nullptr; | 182 | m_display = nullptr; | ||
183 | } | 183 | } | ||
184 | 184 | | |||
185 | KWayland::Client::Surface *TestDragAndDrop::createSurface() | 185 | KWayland::Client::Surface *TestDragAndDrop::createSurface() | ||
186 | { | 186 | { | ||
187 | using namespace KWayland::Client; | 187 | using namespace KWayland::Client; | ||
188 | auto s = m_compositor->createSurface(); | 188 | auto s = m_compositor->createSurface(); | ||
189 | 189 | | |||
190 | QImage img(QSize(100, 200), QImage::Format_ARGB32); | 190 | QImage img(QSize(100, 200), QImage::Format_RGB32); | ||
191 | img.fill(Qt::red); | 191 | img.fill(Qt::red); | ||
192 | s->attachBuffer(m_shm->createBuffer(img)); | 192 | s->attachBuffer(m_shm->createBuffer(img)); | ||
193 | s->damage(QRect(0, 0, 100, 200)); | 193 | s->damage(QRect(0, 0, 100, 200)); | ||
194 | s->commit(Surface::CommitFlag::None); | 194 | s->commit(Surface::CommitFlag::None); | ||
195 | return s; | 195 | return s; | ||
196 | } | 196 | } | ||
197 | 197 | | |||
198 | KWayland::Server::SurfaceInterface *TestDragAndDrop::getServerSurface() | 198 | KWayland::Server::SurfaceInterface *TestDragAndDrop::getServerSurface() | ||
▲ Show 20 Lines • Show All 164 Lines • Show Last 20 Lines |