7#if QT_CONFIG(wayland_compositor_quick)
8#include "qwaylandxdgshellintegration_p.h"
10#include <QtWaylandCompositor/private/qwaylandutils_p.h>
12#include <QtWaylandCompositor/QWaylandCompositor>
13#include <QtWaylandCompositor/QWaylandSeat>
14#include <QtWaylandCompositor/QWaylandSurface>
15#include <QtWaylandCompositor/QWaylandSurfaceRole>
16#include <QtWaylandCompositor/QWaylandResource>
18#include <QtCore/QObject>
31 send_ping(resource->handle, serial);
49 if (surface == xdgSurface->surface())
58 wl_resource_post_error(resource->handle, XDG_WM_BASE_ERROR_DEFUNCT_SURFACES,
59 "xdg_shell was destroyed before children");
61 wl_resource_destroy(resource->handle);
66 QWaylandResource positionerResource(wl_resource_create(resource->client(), &xdg_positioner_interface,
67 wl_resource_get_version(resource->handle),
id));
77 if (surface->
role() !=
nullptr) {
78 wl_resource_post_error(resource->handle, XDG_WM_BASE_ERROR_ROLE,
79 "wl_surface@%d, already has role %s\n",
80 wl_resource_get_id(surface->
resource()),
87 qWarning() <<
"get_xdg_surface requested on a xdg_surface with content";
90 QWaylandResource xdgSurfaceResource(wl_resource_create(resource->client(), &xdg_surface_interface,
91 wl_resource_get_version(resource->handle),
id));
96 emit q->xdgSurfaceCreated(xdgSurface);
104 emit q->pong(serial);
106 qWarning(
"Received an unexpected pong!");
175 qWarning() <<
"Failed to find QWaylandCompositor when initializing QWaylandXdgShell";
180 handleSeatChanged(
compositor->defaultSeat(),
nullptr);
183 this, &QWaylandXdgShell::handleSeatChanged);
191 return QWaylandXdgShellPrivate::interface();
196 return QWaylandXdgShellPrivate::interfaceName();
219 QWaylandXdgShellPrivate::Resource *clientResource =
d->resourceMap().value(client->
client(),
nullptr);
222 d->ping(clientResource, serial);
228 if (oldSeat !=
nullptr) {
230 this, &QWaylandXdgShell::handleFocusChanged);
233 if (newSeat !=
nullptr) {
235 this, &QWaylandXdgShell::handleFocusChanged);
259 if (m_windowType == windowType)
262 m_windowType = windowType;
265 emit q->windowTypeChanged();
290 if (!m_unsetWindowGeometry)
294 if (unsetGeometry == m_windowGeometry)
297 m_windowGeometry = unsetGeometry;
298 emit q->windowGeometryChanged();
311 wl_resource_destroy(resource->handle);
318 if (m_toplevel || m_popup) {
319 wl_resource_post_error(resource->handle, XDG_SURFACE_ERROR_ALREADY_CONSTRUCTED,
320 "xdg_surface already has a role object");
327 QWaylandResource topLevelResource(wl_resource_create(resource->client(), &xdg_toplevel_interface,
328 wl_resource_get_version(resource->handle),
id));
331 emit q->toplevelCreated();
339 if (m_toplevel || m_popup) {
340 wl_resource_post_error(resource->handle, XDG_SURFACE_ERROR_ALREADY_CONSTRUCTED,
341 "xdg_surface already has a role object");
347 wl_resource_post_error(resource->handle, XDG_WM_BASE_ERROR_INVALID_POPUP_PARENT,
348 "xdg_surface.get_popup with invalid popup parent");
354 wl_resource_post_error(resource->handle, XDG_WM_BASE_ERROR_INVALID_POSITIONER,
355 "xdg_surface.get_popup without positioner");
361 wl_resource_post_error(resource->handle, XDG_WM_BASE_ERROR_INVALID_POSITIONER,
362 "xdg_surface.get_popup with invalid positioner (size: %dx%d, anchorRect: %dx%d)",
363 p.size.width(),
p.size.height(),
p.anchorRect.width(),
p.anchorRect.height());
374 qCWarning(qLcWaylandCompositor) <<
"Ignoring client protocol error: xdg_positioner anchor"
375 <<
"rect extends beyond its parent's window geometry";
381 QWaylandResource popupResource(wl_resource_create(resource->client(), &xdg_popup_interface,
382 wl_resource_get_version(resource->handle),
id));
385 emit q->popupCreated();
393 }
else if (m_popup) {
396 wl_resource_post_error(resource->handle, XDG_SURFACE_ERROR_NOT_CONSTRUCTED,
397 "ack_configure requested on an unconstructed xdg_surface");
405 if (!
q->surface()->role()) {
406 wl_resource_post_error(resource->handle, XDG_SURFACE_ERROR_NOT_CONSTRUCTED,
407 "set_window_geometry requested on an unconstructed xdg_surface");
415 qWarning() <<
"Invalid (non-positive) dimensions received in set_window_geometry";
419 m_unsetWindowGeometry =
false;
423 if (m_windowGeometry == geometry)
426 m_windowGeometry = geometry;
427 emit q->windowGeometryChanged();
491 d->m_xdgShell = xdgShell;
495 d->m_windowGeometry =
d->calculateFallbackWindowGeometry();
496 connect(
surface, &QWaylandSurface::destinationSizeChanged,
this, &QWaylandXdgSurface::handleSurfaceSizeChanged);
511 return d->m_windowType;
536 return d->m_windowGeometry;
547void QWaylandXdgSurface::handleSurfaceSizeChanged()
550 d->updateFallbackWindowGeometry();
553void QWaylandXdgSurface::handleBufferScaleChanged()
556 d->updateFallbackWindowGeometry();
573 return d->m_xdgShell;
613 return d->m_toplevel;
644 return QWaylandXdgSurfacePrivate::interface();
652 return QWaylandXdgSurfacePrivate::interfaceName();
660 if (
auto p = QtWayland::fromResource<QWaylandXdgSurfacePrivate *>(resource))
665#if QT_CONFIG(wayland_compositor_quick)
723 wl_resource_destroy(
d->m_decoration->resource()->handle);
741 return d->m_xdgSurface;
759 return d->m_parentToplevel;
846 return d->m_lastAckedConfigure.states;
993 if (!
size.isValid()) {
994 qWarning() <<
"Can't configure xdg_toplevel with an invalid size" <<
size;
1000 uint32_t serial =
d->m_xdgSurface->surface()->compositor()->nextSerial();
1002 d->send_configure(
size.width(),
size.height(), statesBytes);
1168 if (
auto p = QtWayland::fromResource<QWaylandXdgToplevelPrivate *>(resource))
1249QList<int> QWaylandXdgToplevel::statesAsInts()
const
1255 list << static_cast<int>(
state);
1263 : m_xdgSurface(xdgSurface)
1274 qWarning(
"Toplevel received an unexpected ack_configure!");
1281 if (
config.serial == serial)
1286 std::set_symmetric_difference(
1289 std::back_inserter(changedStates));
1295 case state_maximized:
1296 emit q->maximizedChanged();
1298 case state_fullscreen:
1299 emit q->fullscreenChanged();
1301 case state_resizing:
1302 emit q->resizingChanged();
1304 case state_activated:
1305 emit q->activatedChanged();
1310 if (!changedStates.
empty())
1311 emit q->statesChanged();
1334 return Qt::Edges(((edge & 0b1100) >> 1) | ((edge & 0b0010) << 2) | (edge & 0b0001));
1347 qWarning() <<
"Client error: xdg_toplevel destroyed before its decoration object";
1349 wl_resource_destroy(resource->handle);
1362 emit q->parentToplevelChanged();
1381 emit q->titleChanged();
1391 emit q->appIdChanged();
1410 emit q->startMove(seat);
1435 qWarning() <<
"Received a xdg_toplevel.set_max_size request with a negative size";
1442 qWarning() <<
"Received a xdg_toplevel.set_max_size request with a size smaller than the minimium size";
1449 emit q->maxSizeChanged();
1465 qWarning() <<
"Received a xdg_toplevel.set_min_size request with a negative size";
1472 qWarning() <<
"Received a xdg_toplevel.set_min_size request with a size larger than the maximum size";
1479 emit q->minSizeChanged();
1486 emit q->setMaximized();
1493 emit q->unsetMaximized();
1508 emit q->unsetFullscreen();
1515 emit q->setMinimized();
1568 return d->m_xdgSurface;
1586 return d->m_parentXdgSurface;
1605 return d->m_geometry;
1624 return d->m_positionerData.anchorRect;
1651 return d->m_positionerData.anchorEdges;
1676 return d->m_positionerData.gravityEdges;
1697 const uint flags =
d->m_positionerData.constraintAdjustments;
1699 Qt::Orientations constraints = {};
1701 if (
flags & XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_X)
1703 if (
flags & XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_Y)
1727 const uint flags =
d->m_positionerData.constraintAdjustments;
1729 Qt::Orientations constraints = {};
1731 if (
flags & XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_FLIP_X)
1733 if (
flags & XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_FLIP_Y)
1757 const uint flags =
d->m_positionerData.constraintAdjustments;
1759 Qt::Orientations constraints = {};
1761 if (
flags & XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_RESIZE_X)
1763 if (
flags & XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_RESIZE_Y)
1785 return d->m_positionerData.offset;
1802 return d->m_positionerData.size;
1821 return d->m_positionerData.unconstrainedPosition();
1843 return d->sendConfigure(geometry);
1860void QWaylandXdgPopup::sendPopupDone()
1863 d->send_popup_done();
1876 : m_xdgSurface(xdgSurface)
1877 , m_parentXdgSurface(parentXdgSurface)
1878 , m_positionerData(positioner->
m_data)
1894 if (m_pendingConfigures.empty()) {
1895 qWarning(
"Popup received an unexpected ack_configure!");
1900 config = m_pendingConfigures.takeFirst();
1902 if (
config.serial == serial)
1906 if (m_geometry ==
config.geometry)
1909 m_geometry =
config.geometry;
1910 emit q->configuredGeometryChanged();
1913uint QWaylandXdgPopupPrivate::sendConfigure(
const QRect &geometry)
1917 send_configure(geometry.
x(), geometry.
y(), geometry.
width(), geometry.
height());
1967 return QPoint(xPosition, yPosition);
1972 int gravityOffsetY = 0;
1974 gravityOffsetY = -
size.height();
1976 gravityOffsetY = -
size.height() / 2;
1978 int gravityOffsetX = 0;
1980 gravityOffsetX = -
size.width();
1982 gravityOffsetX = -
size.width() / 2;
1984 QPoint gravityOffset(gravityOffsetX, gravityOffsetY);
2001 wl_resource_destroy(resource->handle);
2007 wl_resource_post_error(resource->handle, XDG_POSITIONER_ERROR_INVALID_INPUT,
2008 "xdg_positioner.set_size requested with non-positive dimensions");
2019 wl_resource_post_error(resource->handle, XDG_POSITIONER_ERROR_INVALID_INPUT,
2020 "xdg_positioner.set_anchor_rect requested with non-positive dimensions");
2030 Qt::Edges anchorEdges =
convertToEdges(xdg_positioner::anchor(anchor));
2034 wl_resource_post_error(resource->handle, XDG_POSITIONER_ERROR_INVALID_INPUT,
2035 "xdg_positioner.set_anchor requested with parallel edges");
2044 Qt::Edges gravityEdges =
convertToEdges(xdg_positioner::gravity(gravity));
2048 wl_resource_post_error(resource->handle, XDG_POSITIONER_ERROR_INVALID_INPUT,
2049 "xdg_positioner.set_gravity requested with parallel edges");
2070 return QtWayland::fromResource<QWaylandXdgPositioner *>(resource);
2086 case anchor_top_left:
2088 case anchor_bottom_left:
2090 case anchor_top_right:
2092 case anchor_bottom_right:
2095 qWarning() <<
"Unknown Wayland xdg edge" << anchor;
2108#include "moc_qwaylandxdgshell.cpp"
const char * constData() const noexcept
Returns a pointer to the const data stored in the byte array.
static QByteArray fromRawData(const char *data, qsizetype size)
Constructs a QByteArray that uses the first size bytes of the data array.
bool empty() const noexcept
bool removeOne(const AT &t)
void push_back(parameter_type t)
void reserve(qsizetype size)
void append(parameter_type t)
iterator insert(const Key &key, const T &value)
size_type remove(const Key &key)
QList< T > values() const
\inmodule QtCore\reentrant
constexpr qreal x() const noexcept
Returns the x coordinate of this point.
constexpr qreal y() const noexcept
Returns the y coordinate of this point.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
constexpr int height() const noexcept
Returns the height of the rectangle.
constexpr int bottom() const noexcept
Returns the y-coordinate of the rectangle's bottom edge.
constexpr int top() const noexcept
Returns the y-coordinate of the rectangle's top edge.
bool contains(const QRect &r, bool proper=false) const noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
constexpr int left() const noexcept
Returns the x-coordinate of the rectangle's left edge.
constexpr int x() const noexcept
Returns the x-coordinate of the rectangle's left edge.
constexpr QSize size() const noexcept
Returns the size of the rectangle.
constexpr int width() const noexcept
Returns the width of the rectangle.
constexpr int y() const noexcept
Returns the y-coordinate of the rectangle's top edge.
constexpr int right() const noexcept
Returns the x-coordinate of the rectangle's right edge.
bool remove(const T &value)
iterator insert(const T &value)
constexpr QSize boundedTo(const QSize &) const noexcept
Returns a size holding the minimum width and height of this size and the given otherSize.
constexpr int height() const noexcept
Returns the height.
constexpr int width() const noexcept
Returns the width.
constexpr QSize expandedTo(const QSize &) const noexcept
Returns a size holding the maximum width and height of this size and the given otherSize.
constexpr bool isValid() const noexcept
Returns true if both the width and height is equal to or greater than 0; otherwise returns false.
\macro QT_RESTRICTED_CAST_FROM_ASCII
\qmltype WaylandClient \instantiates QWaylandClient \inqmlmodule QtWayland.Compositor
wl_client * client() const
Returns the Wayland client of this QWaylandClient.
void setExtensionContainer(QWaylandObject *container)
Sets the extension container for this QWaylandCompositorExtension to container.
virtual void initialize()
Initializes the QWaylandCompositorExtension.
QWaylandObject * extensionContainer() const
\qmltype WaylandCompositor \instantiates QWaylandCompositor \inqmlmodule QtWayland....
\qmltype WaylandOutput \instantiates QWaylandOutput \inqmlmodule QtWayland.Compositor
static QWaylandOutput * fromResource(wl_resource *resource)
Returns the QWaylandOutput corresponding to resource.
\inmodule QtWaylandCompositor
\qmltype ShellSurfaceItem \instantiates QWaylandQuickShellSurfaceItem \inherits WaylandQuickItem \inq...
\inmodule QtWaylandCompositor
wl_resource * resource() const
\qmltype WaylandSeat \instantiates QWaylandSeat \inqmlmodule QtWayland.Compositor
void keyboardFocusChanged(QWaylandSurface *newFocus, QWaylandSurface *oldFocus)
\qmlsignal void QtWayland.Compositor::WaylandSeat::keyboardFocusChanged(QWaylandSurface newFocus,...
static QWaylandSeat * fromSeatResource(struct ::wl_resource *resource)
Returns the QWaylandSeat corresponding to the resource.
\inmodule QtWaylandCompositor
\inmodule QtWaylandCompositor
const QByteArray name()
Returns the name of the QWaylandSurfaceRole.
\qmltype WaylandSurface \instantiates QWaylandSurface \inqmlmodule QtWayland.Compositor
QSize destinationSize
\qmlproperty size QtWayland.Compositor::WaylandSurface::destinationSize
struct wl_resource * resource() const
Returns the Wayland resource corresponding to this QWaylandSurface.
QWaylandSurfaceRole * role() const
bool hasContent
\qmlproperty bool QtWayland.Compositor::WaylandSurface::hasContent
static QWaylandSurface * fromResource(::wl_resource *resource)
Returns the QWaylandSurface corresponding to the Wayland resource resource.
QWaylandClient * client
\qmlproperty WaylandClient QtWayland.Compositor::WaylandSurface::client
QWaylandCompositor * compositor() const
Returns the compositor for this QWaylandSurface.
bool setRole(QWaylandSurfaceRole *role, wl_resource *errorResource, uint32_t errorCode)
Sets a role on the surface.
void bufferScaleChanged()
void xdg_popup_destroy(Resource *resource) override
QWaylandXdgPopupPrivate(QWaylandXdgSurface *xdgSurface, QWaylandXdgSurface *parentXdgSurface, QWaylandXdgPositioner *positioner, const QWaylandResource &resource)
void xdg_popup_grab(Resource *resource, struct ::wl_resource *seat, uint32_t serial) override
void handleAckConfigure(uint serial)
static QWaylandSurfaceRole s_role
static QWaylandXdgPopupPrivate * get(QWaylandXdgPopup *popup)
\qmltype XdgPopup \instantiates QWaylandXdgPopup \inqmlmodule QtWayland.Compositor....
Qt::Orientations resizeConstraints
\qmlproperty enumeration XdgPopup::resizeConstraints
QRect anchorRect
\qmlproperty rect XdgPopup::anchorRect
QWaylandXdgSurface * parentXdgSurface
\qmlproperty XdgSurface XdgPopup::parentXdgSurface
QSize positionerSize
\qmlproperty size XdgPopup::positionerSize
Qt::Edges gravityEdges
\qmlproperty rect XdgPopup::gravityEdges
QPoint unconstrainedPosition
\qmlproperty point XdgPopup::unconstrainedPosition
Qt::Orientations flipConstraints
\qmlproperty enumeration XdgPopup::flipConstraints
static QWaylandSurfaceRole * role()
Returns the surface role for the QWaylandPopup.
Qt::Orientations slideConstraints
\qmlproperty enumeration XdgPopup::slideConstraints
QRect configuredGeometry
\qmlproperty rect XdgPopup::configuredGeometry
QWaylandXdgSurface * xdgSurface
\qmlproperty XdgSurface XdgPopup::xdgSurface
Qt::Edges anchorEdges
\qmlproperty enumeration XdgPopup::anchorEdges
QPoint offset
\qmlproperty point XdgPopup::offset
Q_INVOKABLE uint sendConfigure(const QRect &geometry)
\qmlmethod int XdgPopup::sendConfigure(rect geometry)
void xdg_positioner_set_gravity(Resource *resource, uint32_t gravity) override
void xdg_positioner_destroy_resource(Resource *resource) override
void xdg_positioner_set_anchor_rect(Resource *resource, int32_t x, int32_t y, int32_t width, int32_t height) override
static QWaylandXdgPositioner * fromResource(wl_resource *resource)
static Qt::Edges convertToEdges(anchor anchor)
QWaylandXdgPositionerData m_data
void xdg_positioner_set_constraint_adjustment(Resource *resource, uint32_t constraint_adjustment) override
void xdg_positioner_set_anchor(Resource *resource, uint32_t anchor) override
void xdg_positioner_set_offset(Resource *resource, int32_t x, int32_t y) override
void xdg_positioner_set_size(Resource *resource, int32_t width, int32_t height) override
QWaylandXdgPositioner(const QWaylandResource &resource)
void xdg_positioner_destroy(Resource *resource) override
static QWaylandXdgShellPrivate * get(QWaylandXdgShell *xdgShell)
void ping(Resource *resource, uint32_t serial)
QWaylandXdgShellPrivate()
void unregisterXdgSurface(QWaylandXdgSurface *xdgSurface)
void xdg_wm_base_pong(Resource *resource, uint32_t serial) override
QMultiMap< struct wl_client *, QWaylandXdgSurface * > m_xdgSurfaces
void xdg_wm_base_create_positioner(Resource *resource, uint32_t id) override
void registerXdgSurface(QWaylandXdgSurface *xdgSurface)
QWaylandXdgSurface * xdgSurfaceFromSurface(QWaylandSurface *surface)
void xdg_wm_base_get_xdg_surface(Resource *resource, uint32_t id, struct ::wl_resource *surface) override
void xdg_wm_base_destroy(Resource *resource) override
\qmltype XdgShell \instantiates QWaylandXdgShell \inqmlmodule QtWayland.Compositor....
void initialize() override
Initializes the shell extension.
uint ping(QWaylandClient *client)
\qmlmethod void XdgShell::ping(WaylandClient client)
QWaylandXdgShell()
Constructs a QWaylandXdgShell object.
void toplevelCreated(QWaylandXdgToplevel *toplevel, QWaylandXdgSurface *xdgSurface)
\qmlsignal XdgShell::toplevelCreated(XdgToplevel toplevel, XdgSurface xdgSurface)
static QByteArray interfaceName()
static const struct wl_interface * interface()
Returns the Wayland interface for the QWaylandXdgShell.
void popupCreated(QWaylandXdgPopup *popup, QWaylandXdgSurface *xdgSurface)
\qmlsignal XdgShell::popupCreated(XdgPopup popup, XdgSurface xdgSurface)
void setWindowType(Qt::WindowType windowType)
void xdg_surface_get_toplevel(Resource *resource, uint32_t id) override
void xdg_surface_get_popup(Resource *resource, uint32_t id, struct ::wl_resource *parent, struct ::wl_resource *positioner) override
void xdg_surface_ack_configure(Resource *resource, uint32_t serial) override
void handleFocusReceived()
static QWaylandXdgSurfacePrivate * get(QWaylandXdgSurface *xdgSurface)
QRect calculateFallbackWindowGeometry() const
void xdg_surface_destroy_resource(Resource *resource) override
QWaylandXdgSurfacePrivate()
void xdg_surface_set_window_geometry(Resource *resource, int32_t x, int32_t y, int32_t width, int32_t height) override
void updateFallbackWindowGeometry()
void xdg_surface_destroy(Resource *resource) override
\qmltype XdgSurface \instantiates QWaylandXdgSurface \inqmlmodule QtWayland.Compositor....
QWaylandXdgToplevel * toplevel
\qmlproperty XdgToplevel XdgSurface::toplevel
static QWaylandXdgSurface * fromResource(::wl_resource *resource)
Returns the QWaylandXdgSurface corresponding to the resource.
QWaylandSurface * surface
\qmlproperty WaylandSurface XdgSurface::surface
QRect windowGeometry
\qmlproperty rect XdgSurface::windowGeometry
QWaylandXdgShell * shell
\qmlproperty XdgShell XdgSurface::shell
QWaylandXdgSurface()
Constructs a QWaylandXdgSurface.
void initialize() override
static const struct wl_interface * interface()
Returns the Wayland interface for the QWaylandXdgSurface.
static QByteArray interfaceName()
Qt::WindowType windowType() const override
\qmlproperty enum XdgSurface::windowType
QWaylandXdgPopup * popup
\qmlproperty XdgPopup XdgSurface::popup
void xdg_toplevel_set_min_size(Resource *resource, int32_t width, int32_t height) override
QList< ConfigureEvent > m_pendingConfigures
ConfigureEvent m_lastAckedConfigure
void xdg_toplevel_unset_fullscreen(Resource *resource) override
void xdg_toplevel_set_max_size(Resource *resource, int32_t width, int32_t height) override
ConfigureEvent lastSentConfigure() const
void xdg_toplevel_move(Resource *resource, struct ::wl_resource *seatResource, uint32_t serial) override
void handleAckConfigure(uint serial)
void xdg_toplevel_set_title(Resource *resource, const QString &title) override
void xdg_toplevel_set_fullscreen(Resource *resource, struct ::wl_resource *output) override
QWaylandXdgToplevelDecorationV1 * m_decoration
static QWaylandXdgToplevelPrivate * get(QWaylandXdgToplevel *toplevel)
void xdg_toplevel_resize(Resource *resource, struct ::wl_resource *seat, uint32_t serial, uint32_t edges) override
QWaylandXdgSurface * m_xdgSurface
void handleFocusReceived()
void xdg_toplevel_set_app_id(Resource *resource, const QString &app_id) override
void xdg_toplevel_destroy(Resource *resource) override
QWaylandXdgToplevelPrivate(QWaylandXdgSurface *xdgSurface, const QWaylandResource &resource)
void xdg_toplevel_set_minimized(Resource *resource) override
static Qt::Edges convertToEdges(resize_edge edge)
void xdg_toplevel_show_window_menu(Resource *resource, struct ::wl_resource *seat, uint32_t serial, int32_t x, int32_t y) override
static QWaylandSurfaceRole s_role
QWaylandXdgToplevel * m_parentToplevel
void xdg_toplevel_destroy_resource(Resource *resource) override
void xdg_toplevel_set_parent(Resource *resource, struct ::wl_resource *parent) override
void xdg_toplevel_set_maximized(Resource *resource) override
void xdg_toplevel_unset_maximized(Resource *resource) override
\qmltype XdgToplevel \instantiates QWaylandXdgToplevel \inqmlmodule QtWayland.Compositor....
QWaylandXdgToplevel(QWaylandXdgSurface *xdgSurface, QWaylandResource &resource)
Constructs a QWaylandXdgToplevel for the given xdgSurface and resource.
Q_INVOKABLE void sendClose()
\qmlmethod void XdgToplevel::sendClose()
Q_INVOKABLE uint sendMaximized(const QSize &size)
\qmlmethod void XdgToplevel::sendMaximized(size size)
QString title
\qmlproperty string XdgToplevel::title
~QWaylandXdgToplevel() override
Q_INVOKABLE QSize sizeForResize(const QSizeF &size, const QPointF &delta, Qt::Edges edges) const
\qmlmethod size XdgToplevel::sizeForResize(size size, point delta, uint edges)
QSize maxSize
\qmlproperty size XdgToplevel::maxSize
QWaylandXdgToplevel * parentToplevel
\qmlproperty XdgToplevel XdgToplevel::parentToplevel
QString appId
\qmlproperty string XdgToplevel::appId
Q_INVOKABLE uint sendResizing(const QSize &maxSize)
\qmlmethod void XdgToplevel::sendResizing(size maxSize)
bool resizing
\qmlproperty bool XdgToplevel::resizing
uint sendConfigure(const QSize &size, const QList< State > &states)
QWaylandXdgSurface * xdgSurface
\qmlproperty XdgSurface XdgToplevel::xdgSurface
Q_INVOKABLE uint sendUnmaximized(const QSize &size=QSize(0, 0))
\qmlmethod void XdgToplevel::sendUnmaximized(size size)
static QWaylandXdgToplevel * fromResource(::wl_resource *resource)
Returns the QWaylandXdgToplevel corresponding to the resource.
static QWaylandSurfaceRole * role()
Returns the surface role for the QWaylandToplevel.
bool maximized
\qmlproperty bool XdgToplevel::maximized
QSize minSize
\qmlproperty size XdgToplevel::minSize
DecorationMode
This enum type is used to specify the window decoration mode for toplevel windows.
QList< int > states
This property holds the last states the client acknowledged for this QWaylandToplevel.
Q_INVOKABLE uint sendFullscreen(const QSize &size)
\qmlmethod void XdgToplevel::sendFullscreen(size size)
enum DecorationMode decorationMode
\qmlproperty enumeration XdgToplevel::decorationMode
bool activated
\qmlproperty bool XdgToplevel::activated
bool fullscreen
\qmlproperty bool XdgToplevel::fullscreen
Combined button and popup list for selecting options.
#define qCWarning(category,...)
static QOpenGLCompositor * compositor
GLint GLint GLint GLint GLint x
[0]
GLint GLsizei GLsizei height
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLuint GLintptr offset
GLdouble GLdouble GLdouble GLdouble q
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
static QT_BEGIN_NAMESPACE void init(QTextBoundaryFinder::BoundaryType type, QStringView str, QCharAttributes *attributes)
QT_BEGIN_NAMESPACE typedef uchar * output
connect(quitButton, &QPushButton::clicked, &app, &QCoreApplication::quit, Qt::QueuedConnection)
myObject disconnect()
[26]
bool contains(const AT &t) const noexcept
QPoint anchorPoint() const
QWaylandXdgPositionerData()
QPoint unconstrainedPosition() const
uint constraintAdjustments
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent