11#include "qwayland-server-xwayland-shell-v1.h"
18static const quint32 s_version = 1;
57 : QtWaylandServer::xwayland_shell_v1(*display, s_version)
64 wl_resource_destroy(resource->handle);
73 wl_resource_post_error(resource->handle, error_role,
"the surface already has a role assigned %s", role->name().constData());
82 QObject::connect(xwaylandSurface, &QObject::destroyed,
q, [
this, xwaylandSurface]() {
89 , QtWaylandServer::xwayland_surface_v1(client, id,
version)
98 if (commit->
serial.has_value()) {
111 const uint64_t
serial = (uint64_t(serial_hi) << 32) | serial_lo;
113 wl_resource_post_error(resource->handle, error_invalid_serial,
"given serial is 0");
117 if (this->serial.has_value()) {
118 wl_resource_post_error(resource->handle, error_already_associated,
119 "xwayland_surface_v1 already has a serial assigned to it: %" PRIu64, this->serial.value());
128 wl_resource_destroy(resource->handle);
144 if (surface->serial() == serial) {
178#include "moc_xwaylandshell_v1.cpp"
Class holding the Wayland server display loop.
XwaylandSurfaceV1Commit pending
Resource representing a wl_surface.
static SurfaceInterface * get(wl_resource *native)
SurfaceRole * role() const
void setRole(SurfaceRole *role)
XwaylandShellV1Interface(Display *display, QObject *parent=nullptr)
void surfaceAssociated(XwaylandSurfaceV1Interface *surface)
XwaylandSurfaceV1Interface * findSurface(uint64_t serial) const
~XwaylandShellV1Interface() override
XwaylandShellV1InterfacePrivate(Display *display, XwaylandShellV1Interface *q)
void xwayland_shell_v1_get_xwayland_surface(Resource *resource, uint32_t id, struct ::wl_resource *surface) override
QList< XwaylandSurfaceV1Interface * > m_surfaces
void xwayland_shell_v1_destroy(Resource *resource) override
XwaylandShellV1Interface * q
XwaylandSurfaceV1Interface(XwaylandShellV1Interface *shell, SurfaceInterface *surface, wl_client *client, uint32_t id, int version)
SurfaceInterface * surface() const
static SurfaceRole * role()
std::optional< uint64_t > serial() const
~XwaylandSurfaceV1Interface() override
void apply(XwaylandSurfaceV1Commit *commit) override
void xwayland_surface_v1_set_serial(Resource *resource, uint32_t serial_lo, uint32_t serial_hi) override
void xwayland_surface_v1_destroy_resource(Resource *resource) override
XwaylandSurfaceV1Interface * q
void xwayland_surface_v1_destroy(Resource *resource) override
XwaylandSurfaceV1InterfacePrivate(XwaylandShellV1Interface *shell, SurfaceInterface *surface, wl_client *client, uint32_t id, int version, XwaylandSurfaceV1Interface *q)
XwaylandShellV1Interface * shell
std::optional< uint64_t > serial
QPointer< SurfaceInterface > surface
std::optional< uint64_t > serial