Changeset View
Changeset View
Standalone View
Standalone View
src/server/qtsurfaceextension_interface.cpp
Show First 20 Lines • Show All 175 Lines • ▼ Show 20 Line(s) | 175 | { | |||
---|---|---|---|---|---|
176 | Q_UNUSED(client) | 176 | Q_UNUSED(client) | ||
177 | Q_UNUSED(resource) | 177 | Q_UNUSED(resource) | ||
178 | Q_UNUSED(flags) | 178 | Q_UNUSED(flags) | ||
179 | } | 179 | } | ||
180 | 180 | | |||
181 | void QtExtendedSurfaceInterface::Private::updateGenericPropertyCallback(wl_client *client, wl_resource *resource, const char *name, wl_array *value) | 181 | void QtExtendedSurfaceInterface::Private::updateGenericPropertyCallback(wl_client *client, wl_resource *resource, const char *name, wl_array *value) | ||
182 | { | 182 | { | ||
183 | Q_UNUSED(client) | 183 | Q_UNUSED(client) | ||
184 | Q_UNUSED(resource) | 184 | QByteArray data = QByteArray::fromRawData(static_cast<char *>(value->data), value->size); | ||
185 | Q_UNUSED(name) | 185 | | ||
186 | Q_UNUSED(value) | 186 | QVariant variantValue; | ||
187 | QDataStream ds(data); | ||||
188 | ds >> variantValue; | ||||
189 | cast<Private>(resource)->q_func()->setProperty(name, variantValue); | ||||
187 | } | 190 | } | ||
188 | 191 | | |||
189 | QtExtendedSurfaceInterface::QtExtendedSurfaceInterface(QtSurfaceExtensionInterface *shell, SurfaceInterface *parent, wl_resource *parentResource) | 192 | QtExtendedSurfaceInterface::QtExtendedSurfaceInterface(QtSurfaceExtensionInterface *shell, SurfaceInterface *parent, wl_resource *parentResource) | ||
190 | : Resource(new Private(this, shell, parent, parentResource)) | 193 | : Resource(new Private(this, shell, parent, parentResource)) | ||
191 | { | 194 | { | ||
192 | auto unsetSurface = [this] { | 195 | auto unsetSurface = [this] { | ||
193 | Q_D(); | 196 | Q_D(); | ||
194 | d->surface = nullptr; | 197 | d->surface = nullptr; | ||
Show All 36 Lines |