QWaylandSurface Class

The QWaylandSurface class represents a rectangular area on an output device. More...

Header: #include <QWaylandSurface>
qmake: QT += waylandcompositor
Since: Qt 5.8
Inherits: QWaylandObject

This class was introduced in Qt 5.8.

Public Functions

void childAdded(QWaylandSurface *child)
void dragStarted(QWaylandDrag *drag)
QWaylandView *primaryView() const
struct wl_resource *resource() const
void setPrimaryView(QWaylandView *view)
void surfaceDestroyed()
int views() const

Static Public Members

QWaylandSurface *fromResource(::wl_resource *resource)

Detailed Description

This class encapsulates a rectangular area of pixels that is displayed on an output device. It corresponds to the interface wl_surface in the Wayland protocol.

Member Function Documentation

void QWaylandSurface::childAdded(QWaylandSurface *child)

This signal is emitted when a wl_subsurface, child, has been added to the surface.

void QWaylandSurface::dragStarted(QWaylandDrag *drag)

This signal is emitted when a drag has started from this surface.

[static] QWaylandSurface *QWaylandSurface::fromResource(::wl_resource *resource)

Returns the QWaylandSurface corresponding to the Wayland resource resource.

QWaylandView *QWaylandSurface::primaryView() const

Returns this QWaylandSurface's primary view.

See also QWaylandView::advance() and QWaylandSurface::setPrimaryView().

struct wl_resource *QWaylandSurface::resource() const

Returns the Wayland resource corresponding to this QWaylandSurface.

void QWaylandSurface::setPrimaryView(QWaylandView *view)

Sets this QWaylandSurface's primary view to view, in case there are multiple views of this surface. The primary view is the view that governs the client's refresh rate. It takes care of discarding buffer references when QWaylandView::advance() is called. See the documentation for QWaylandView::advance() for more details.

In shell surface integrations, such as QWaylandWlShellIntegration and QWaylandXdgShellV5Integration, maximize and fullscreen requests from the client will only have an effect if the integration has the primary view of the surface.

See also primaryView() and QWaylandView::advance().

void QWaylandSurface::surfaceDestroyed()

This signal is emitted when the corresponing wl_surface is destroyed.

int QWaylandSurface::views() const

Returns the views for this QWaylandSurface.