Changeset View
Changeset View
Standalone View
Standalone View
src/server/xdgforeign_v2_interface.cpp
Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Line(s) | 89 | if (it != d->exportedSurfaces.constEnd()) { | |||
---|---|---|---|---|---|
90 | return it.value(); | 90 | return it.value(); | ||
91 | } | 91 | } | ||
92 | return nullptr; | 92 | return nullptr; | ||
93 | } | 93 | } | ||
94 | 94 | | |||
95 | void XdgExporterUnstableV2Interface::Private::destroyCallback(wl_client *client, wl_resource *resource) | 95 | void XdgExporterUnstableV2Interface::Private::destroyCallback(wl_client *client, wl_resource *resource) | ||
96 | { | 96 | { | ||
97 | Q_UNUSED(client) | 97 | Q_UNUSED(client) | ||
98 | Q_UNUSED(resource) | ||||
98 | } | 99 | } | ||
99 | 100 | | |||
100 | void XdgExporterUnstableV2Interface::Private::exportCallback(wl_client *client, wl_resource *resource, uint32_t id, wl_resource * surface) | 101 | void XdgExporterUnstableV2Interface::Private::exportCallback(wl_client *client, wl_resource *resource, uint32_t id, wl_resource * surface) | ||
101 | { | 102 | { | ||
102 | auto s = cast(resource); | 103 | auto s = cast(resource); | ||
103 | QPointer <XdgExportedUnstableV2Interface> e = new XdgExportedUnstableV2Interface(s->q, surface); | 104 | QPointer <XdgExportedUnstableV2Interface> e = new XdgExportedUnstableV2Interface(s->q, surface); | ||
104 | 105 | | |||
105 | e->create(s->display->getConnection(client), wl_resource_get_version(resource), id); | 106 | e->create(s->display->getConnection(client), wl_resource_get_version(resource), id); | ||
▲ Show 20 Lines • Show All 126 Lines • ▼ Show 20 Line(s) | |||||
232 | XdgImporterUnstableV2Interface::Private *XdgImporterUnstableV2Interface::d_func() const | 233 | XdgImporterUnstableV2Interface::Private *XdgImporterUnstableV2Interface::d_func() const | ||
233 | { | 234 | { | ||
234 | return reinterpret_cast<Private*>(d.data()); | 235 | return reinterpret_cast<Private*>(d.data()); | ||
235 | } | 236 | } | ||
236 | 237 | | |||
237 | void XdgImporterUnstableV2Interface::Private::destroyCallback(wl_client *client, wl_resource *resource) | 238 | void XdgImporterUnstableV2Interface::Private::destroyCallback(wl_client *client, wl_resource *resource) | ||
238 | { | 239 | { | ||
239 | Q_UNUSED(client) | 240 | Q_UNUSED(client) | ||
241 | Q_UNUSED(resource) | ||||
240 | } | 242 | } | ||
241 | 243 | | |||
242 | void XdgImporterUnstableV2Interface::Private::importCallback(wl_client *client, wl_resource *resource, uint32_t id, const char *h) | 244 | void XdgImporterUnstableV2Interface::Private::importCallback(wl_client *client, wl_resource *resource, uint32_t id, const char *h) | ||
243 | { | 245 | { | ||
244 | auto s = cast(resource); | 246 | auto s = cast(resource); | ||
245 | 247 | | |||
246 | Q_ASSERT(s->foreignInterface); | 248 | Q_ASSERT(s->foreignInterface); | ||
247 | const QString handle = QString::fromUtf8(h); | 249 | const QString handle = QString::fromUtf8(h); | ||
▲ Show 20 Lines • Show All 185 Lines • ▼ Show 20 Line(s) | |||||
433 | SurfaceInterface *XdgImportedUnstableV2Interface::child() const | 435 | SurfaceInterface *XdgImportedUnstableV2Interface::child() const | ||
434 | { | 436 | { | ||
435 | Q_D(); | 437 | Q_D(); | ||
436 | return d->parentOf.data(); | 438 | return d->parentOf.data(); | ||
437 | } | 439 | } | ||
438 | 440 | | |||
439 | void XdgImportedUnstableV2Interface::Private::setParentOfCallback(wl_client *client, wl_resource *resource, wl_resource * surface) | 441 | void XdgImportedUnstableV2Interface::Private::setParentOfCallback(wl_client *client, wl_resource *resource, wl_resource * surface) | ||
440 | { | 442 | { | ||
443 | Q_UNUSED(client) | ||||
444 | | ||||
441 | auto s = cast<Private>(resource); | 445 | auto s = cast<Private>(resource); | ||
442 | SurfaceInterface *surf = SurfaceInterface::get(surface); | 446 | SurfaceInterface *surf = SurfaceInterface::get(surface); | ||
443 | 447 | | |||
444 | if (!surf) { | 448 | if (!surf) { | ||
445 | return; | 449 | return; | ||
446 | } | 450 | } | ||
447 | 451 | | |||
448 | s->parentOf = surf; | 452 | s->parentOf = surf; | ||
Show All 14 Lines |