7#if QT_CONFIG(wayland_compositor_quick)
10#include <QtWaylandCompositor/private/qwaylandutils_p.h>
14#include <QtWaylandCompositor/QWaylandCompositor>
15#include <QtWaylandCompositor/QWaylandSeat>
16#include <QtWaylandCompositor/QWaylandSurface>
17#include <QtWaylandCompositor/QWaylandSurfaceRole>
18#include <QtWaylandCompositor/QWaylandResource>
20#include <QtCore/QObject>
33 send_ping(resource->handle, serial);
51 if (surface == xdgSurface->surface())
60 wl_resource_post_error(resource->handle, XDG_WM_BASE_ERROR_DEFUNCT_SURFACES,
61 "xdg_shell was destroyed before children");
63 wl_resource_destroy(resource->handle);
68 QWaylandResource positionerResource(wl_resource_create(resource->client(), &xdg_positioner_interface,
69 wl_resource_get_version(resource->handle),
id));
79 if (surface->
role() !=
nullptr) {
80 wl_resource_post_error(resource->handle, XDG_WM_BASE_ERROR_ROLE,
81 "wl_surface@%d, already has role %s\n",
82 wl_resource_get_id(surface->
resource()),
89 qWarning() <<
"get_xdg_surface requested on a xdg_surface with content";
92 QWaylandResource xdgSurfaceResource(wl_resource_create(resource->client(), &xdg_surface_interface,
93 wl_resource_get_version(resource->handle),
id));
98 emit q->xdgSurfaceCreated(xdgSurface);
106 emit q->pong(serial);
108 qWarning(
"Received an unexpected pong!");
177 qWarning() <<
"Failed to find QWaylandCompositor when initializing QWaylandXdgShell";
182 handleSeatChanged(
compositor->defaultSeat(),
nullptr);
185 this, &QWaylandXdgShell::handleSeatChanged);
189 dialogExtension->setParent(
this);
197 return QWaylandXdgShellPrivate::interface();
202 return QWaylandXdgShellPrivate::interfaceName();
225 QWaylandXdgShellPrivate::Resource *clientResource =
d->resourceMap().value(client->
client(),
nullptr);
228 d->ping(clientResource, serial);
234 if (oldSeat !=
nullptr) {
236 this, &QWaylandXdgShell::handleFocusChanged);
239 if (newSeat !=
nullptr) {
241 this, &QWaylandXdgShell::handleFocusChanged);
265 if (m_windowType == windowType)
268 m_windowType = windowType;
271 emit q->windowTypeChanged();
296 if (!m_unsetWindowGeometry)
300 if (unsetGeometry == m_windowGeometry)
303 m_windowGeometry = unsetGeometry;
304 emit q->windowGeometryChanged();
317 wl_resource_destroy(resource->handle);
324 if (m_toplevel || m_popup) {
325 wl_resource_post_error(resource->handle, XDG_SURFACE_ERROR_ALREADY_CONSTRUCTED,
326 "xdg_surface already has a role object");
333 QWaylandResource topLevelResource(wl_resource_create(resource->client(), &xdg_toplevel_interface,
334 wl_resource_get_version(resource->handle),
id));
337 emit q->toplevelCreated();
340 q->setModal(m_toplevel->
modal());
348 if (m_toplevel || m_popup) {
349 wl_resource_post_error(resource->handle, XDG_SURFACE_ERROR_ALREADY_CONSTRUCTED,
350 "xdg_surface already has a role object");
356 wl_resource_post_error(resource->handle, XDG_WM_BASE_ERROR_INVALID_POPUP_PARENT,
357 "xdg_surface.get_popup with invalid popup parent");
363 wl_resource_post_error(resource->handle, XDG_WM_BASE_ERROR_INVALID_POSITIONER,
364 "xdg_surface.get_popup without positioner");
370 wl_resource_post_error(resource->handle, XDG_WM_BASE_ERROR_INVALID_POSITIONER,
371 "xdg_surface.get_popup with invalid positioner (size: %dx%d, anchorRect: %dx%d)",
372 p.size.width(),
p.size.height(),
p.anchorRect.width(),
p.anchorRect.height());
383 qCWarning(qLcWaylandCompositor) <<
"Ignoring client protocol error: xdg_positioner anchor"
384 <<
"rect extends beyond its parent's window geometry";
390 QWaylandResource popupResource(wl_resource_create(resource->client(), &xdg_popup_interface,
391 wl_resource_get_version(resource->handle),
id));
394 emit q->popupCreated();
402 }
else if (m_popup) {
405 wl_resource_post_error(resource->handle, XDG_SURFACE_ERROR_NOT_CONSTRUCTED,
406 "ack_configure requested on an unconstructed xdg_surface");
414 if (!
q->surface()->role()) {
415 wl_resource_post_error(resource->handle, XDG_SURFACE_ERROR_NOT_CONSTRUCTED,
416 "set_window_geometry requested on an unconstructed xdg_surface");
424 qWarning() <<
"Invalid (non-positive) dimensions received in set_window_geometry";
428 m_unsetWindowGeometry =
false;
432 if (m_windowGeometry == geometry)
435 m_windowGeometry = geometry;
436 emit q->windowGeometryChanged();
500 d->m_xdgShell = xdgShell;
504 d->m_windowGeometry =
d->calculateFallbackWindowGeometry();
505 connect(
surface, &QWaylandSurface::destinationSizeChanged,
this, &QWaylandXdgSurface::handleSurfaceSizeChanged);
520 return d->m_windowType;
545 return d->m_windowGeometry;
556void QWaylandXdgSurface::handleSurfaceSizeChanged()
559 d->updateFallbackWindowGeometry();
562void QWaylandXdgSurface::handleBufferScaleChanged()
565 d->updateFallbackWindowGeometry();
582 return d->m_xdgShell;
622 return d->m_toplevel;
653 return QWaylandXdgSurfacePrivate::interface();
661 return QWaylandXdgSurfacePrivate::interfaceName();
669 if (
auto p = QtWayland::fromResource<QWaylandXdgSurfacePrivate *>(resource))
674#if QT_CONFIG(wayland_compositor_quick)
722 QList<QWaylandXdgToplevel::State>
states;
732 wl_resource_destroy(
d->m_decoration->resource()->handle);
750 return d->m_xdgSurface;
768 return d->m_parentToplevel;
855 return d->m_lastAckedConfigure.states;
945void QWaylandXdgToplevel::setModal(
bool newModal)
948 if (
d->m_modal == newModal)
950 d->m_modal = newModal;
1015 .expandedTo({1, 1});
1030 if (!
size.isValid()) {
1031 qWarning() <<
"Can't configure xdg_toplevel with an invalid size" <<
size;
1037 uint32_t serial =
d->m_xdgSurface->surface()->compositor()->nextSerial();
1039 d->send_configure(
size.width(),
size.height(), statesBytes);
1205 if (
auto p = QtWayland::fromResource<QWaylandXdgToplevelPrivate *>(resource))
1286QList<int> QWaylandXdgToplevel::statesAsInts()
const
1292 list << static_cast<int>(
state);
1300 : m_xdgSurface(xdgSurface)
1311 qWarning(
"Toplevel received an unexpected ack_configure!");
1318 if (
config.serial == serial)
1322 QList<uint> changedStates;
1323 std::set_symmetric_difference(
1326 std::back_inserter(changedStates));
1332 case state_maximized:
1333 emit q->maximizedChanged();
1335 case state_fullscreen:
1336 emit q->fullscreenChanged();
1338 case state_resizing:
1339 emit q->resizingChanged();
1341 case state_activated:
1342 emit q->activatedChanged();
1347 if (!changedStates.empty())
1348 emit q->statesChanged();
1371 return Qt::Edges(((edge & 0b1100) >> 1) | ((edge & 0b0010) << 2) | (edge & 0b0001));
1384 qWarning() <<
"Client error: xdg_toplevel destroyed before its decoration object";
1386 wl_resource_destroy(resource->handle);
1399 emit q->parentToplevelChanged();
1418 emit q->titleChanged();
1428 emit q->appIdChanged();
1447 emit q->startMove(seat);
1472 qWarning() <<
"Received a xdg_toplevel.set_max_size request with a negative size";
1479 qWarning() <<
"Received a xdg_toplevel.set_max_size request with a size smaller than the minimium size";
1486 emit q->maxSizeChanged();
1502 qWarning() <<
"Received a xdg_toplevel.set_min_size request with a negative size";
1509 qWarning() <<
"Received a xdg_toplevel.set_min_size request with a size larger than the maximum size";
1516 emit q->minSizeChanged();
1523 emit q->setMaximized();
1530 emit q->unsetMaximized();
1545 emit q->unsetFullscreen();
1552 emit q->setMinimized();
1605 return d->m_xdgSurface;
1623 return d->m_parentXdgSurface;
1642 return d->m_geometry;
1661 return d->m_positionerData.anchorRect;
1688 return d->m_positionerData.anchorEdges;
1713 return d->m_positionerData.gravityEdges;
1734 const uint flags =
d->m_positionerData.constraintAdjustments;
1736 Qt::Orientations constraints = {};
1738 if (
flags & XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_X)
1740 if (
flags & XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_Y)
1764 const uint flags =
d->m_positionerData.constraintAdjustments;
1766 Qt::Orientations constraints = {};
1768 if (
flags & XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_FLIP_X)
1770 if (
flags & XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_FLIP_Y)
1794 const uint flags =
d->m_positionerData.constraintAdjustments;
1796 Qt::Orientations constraints = {};
1798 if (
flags & XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_RESIZE_X)
1800 if (
flags & XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_RESIZE_Y)
1822 return d->m_positionerData.offset;
1839 return d->m_positionerData.size;
1858 return d->m_positionerData.unconstrainedPosition();
1880 return d->sendConfigure(geometry);
1897void QWaylandXdgPopup::sendPopupDone()
1900 d->send_popup_done();
1913 : m_xdgSurface(xdgSurface)
1914 , m_parentXdgSurface(parentXdgSurface)
1915 , m_positionerData(positioner->
m_data)
1931 if (m_pendingConfigures.empty()) {
1932 qWarning(
"Popup received an unexpected ack_configure!");
1937 config = m_pendingConfigures.takeFirst();
1939 if (
config.serial == serial)
1943 if (m_geometry ==
config.geometry)
1946 m_geometry =
config.geometry;
1947 emit q->configuredGeometryChanged();
1950uint QWaylandXdgPopupPrivate::sendConfigure(
const QRect &geometry)
1954 send_configure(geometry.
x(), geometry.
y(), geometry.
width(), geometry.
height());
2004 return QPoint(xPosition, yPosition);
2009 int gravityOffsetY = 0;
2011 gravityOffsetY = -
size.height();
2013 gravityOffsetY = -
size.height() / 2;
2015 int gravityOffsetX = 0;
2017 gravityOffsetX = -
size.width();
2019 gravityOffsetX = -
size.width() / 2;
2021 QPoint gravityOffset(gravityOffsetX, gravityOffsetY);
2038 wl_resource_destroy(resource->handle);
2044 wl_resource_post_error(resource->handle, XDG_POSITIONER_ERROR_INVALID_INPUT,
2045 "xdg_positioner.set_size requested with non-positive dimensions");
2056 wl_resource_post_error(resource->handle, XDG_POSITIONER_ERROR_INVALID_INPUT,
2057 "xdg_positioner.set_anchor_rect requested with non-positive dimensions");
2067 Qt::Edges anchorEdges =
convertToEdges(xdg_positioner::anchor(anchor));
2071 wl_resource_post_error(resource->handle, XDG_POSITIONER_ERROR_INVALID_INPUT,
2072 "xdg_positioner.set_anchor requested with parallel edges");
2081 Qt::Edges gravityEdges =
convertToEdges(xdg_positioner::gravity(gravity));
2085 wl_resource_post_error(resource->handle, XDG_POSITIONER_ERROR_INVALID_INPUT,
2086 "xdg_positioner.set_gravity requested with parallel edges");
2107 return QtWayland::fromResource<QWaylandXdgPositioner *>(resource);
2123 case anchor_top_left:
2125 case anchor_bottom_left:
2127 case anchor_top_right:
2129 case anchor_bottom_right:
2132 qWarning() <<
"Unknown Wayland xdg edge" << anchor;
2145#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 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.
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
bool modal
\qmlproperty bool XdgToplevel::modal
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