summaryrefslogtreecommitdiffstats
path: root/src/compositor
diff options
context:
space:
mode:
Diffstat (limited to 'src/compositor')
-rw-r--r--src/compositor/compositor.pro2
-rw-r--r--src/compositor/compositor_api/qwaylandclient.h1
-rw-r--r--src/compositor/compositor_api/qwaylandcompositor.cpp40
-rw-r--r--src/compositor/compositor_api/qwaylandcompositor.h1
-rw-r--r--src/compositor/compositor_api/qwaylanddrag.h1
-rw-r--r--src/compositor/compositor_api/qwaylandquickitem.cpp84
-rw-r--r--src/compositor/compositor_api/qwaylandquickitem.h10
-rw-r--r--src/compositor/compositor_api/qwaylandquickitem_p.h1
-rw-r--r--src/compositor/compositor_api/qwaylandseat.cpp10
-rw-r--r--src/compositor/compositor_api/qwaylandseat.h2
-rw-r--r--src/compositor/compositor_api/qwaylandsurface.cpp26
-rw-r--r--src/compositor/compositor_api/qwaylandsurface.h9
-rw-r--r--src/compositor/compositor_api/qwaylandview.h1
-rw-r--r--src/compositor/configure.json9
-rw-r--r--src/compositor/doc/src/qtwaylandcompositor-overview.qdoc2
-rw-r--r--src/compositor/extensions/qwaylandidleinhibitv1.cpp4
-rw-r--r--src/compositor/extensions/qwaylandiviapplication.cpp2
-rw-r--r--src/compositor/extensions/qwaylandivisurface.h1
-rw-r--r--src/compositor/extensions/qwaylandquickshellintegration.cpp2
-rw-r--r--src/compositor/extensions/qwaylandquickshellsurfaceitem.h1
-rw-r--r--src/compositor/extensions/qwaylandquickshellsurfaceitem_p.h8
-rw-r--r--src/compositor/extensions/qwaylandshell.cpp10
-rw-r--r--src/compositor/extensions/qwaylandshell.h4
-rw-r--r--src/compositor/extensions/qwaylandshellsurface.cpp2
-rw-r--r--src/compositor/extensions/qwaylandwlshell.h1
-rw-r--r--src/compositor/extensions/qwaylandxdgoutputv1.cpp4
-rw-r--r--src/compositor/extensions/qwaylandxdgoutputv1.h1
-rw-r--r--src/compositor/extensions/qwaylandxdgshell.cpp6
-rw-r--r--src/compositor/extensions/qwaylandxdgshell.h10
-rw-r--r--src/compositor/extensions/qwaylandxdgshell_p.h4
-rw-r--r--src/compositor/extensions/qwaylandxdgshellv5.cpp39
-rw-r--r--src/compositor/extensions/qwaylandxdgshellv5.h1
-rw-r--r--src/compositor/extensions/qwaylandxdgshellv6.cpp6
-rw-r--r--src/compositor/extensions/qwaylandxdgshellv6.h5
-rw-r--r--src/compositor/extensions/qwaylandxdgshellv6_p.h4
-rw-r--r--src/compositor/extensions/qwlqttouch.cpp1
-rw-r--r--src/compositor/extensions/qwltexturesharingextension.cpp7
37 files changed, 162 insertions, 160 deletions
diff --git a/src/compositor/compositor.pro b/src/compositor/compositor.pro
index b887cf281..7041769a0 100644
--- a/src/compositor/compositor.pro
+++ b/src/compositor/compositor.pro
@@ -3,6 +3,8 @@ MODULE = waylandcompositor
QT = core gui-private
+qtConfig(opengl): QT += opengl
+
qtConfig(xkbcommon) {
QT_FOR_PRIVATE += xkbcommon_support-private
}
diff --git a/src/compositor/compositor_api/qwaylandclient.h b/src/compositor/compositor_api/qwaylandclient.h
index 8f52244c1..69fbfec03 100644
--- a/src/compositor/compositor_api/qwaylandclient.h
+++ b/src/compositor/compositor_api/qwaylandclient.h
@@ -52,6 +52,7 @@ class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandClient : public QObject
Q_PROPERTY(qint64 userId READ userId CONSTANT)
Q_PROPERTY(qint64 groupId READ groupId CONSTANT)
Q_PROPERTY(qint64 processId READ processId CONSTANT)
+ Q_MOC_INCLUDE("qwaylandcompositor.h")
public:
~QWaylandClient() override;
diff --git a/src/compositor/compositor_api/qwaylandcompositor.cpp b/src/compositor/compositor_api/qwaylandcompositor.cpp
index b75ead7bd..83833991f 100644
--- a/src/compositor/compositor_api/qwaylandcompositor.cpp
+++ b/src/compositor/compositor_api/qwaylandcompositor.cpp
@@ -114,6 +114,15 @@ public:
QWaylandKeyboardPrivate *keyb = QWaylandKeyboardPrivate::get(seat->keyboard());
+#if defined(Q_OS_QNX)
+ // The QNX platform plugin delivers scan codes that haven't been adjusted to be
+ // xkbcommon compatible. xkbcommon requires that the scan codes be bumped up by
+ // 8 because that's how evdev/XKB deliver scan codes. You might think that it
+ // would've been better to remove this (odd) requirement from xkbcommon on QNX
+ // but it turns out that conforming to it has much less impact.
+ static int offset = QGuiApplication::platformName() == QStringLiteral("qnx") ? 8 : 0;
+ ke->nativeScanCode += offset;
+#endif
uint32_t code = ke->nativeScanCode;
bool isDown = ke->keyType == QEvent::KeyPress;
@@ -236,9 +245,12 @@ void QWaylandCompositorPrivate::init()
QWaylandCompositorPrivate::~QWaylandCompositorPrivate()
{
- qDeleteAll(clients);
+ // Take copies, since the lists will get modified as elements are deleted
+ const auto clientsToDelete = clients;
+ qDeleteAll(clientsToDelete);
- qDeleteAll(outputs);
+ const auto outputsToDelete = outputs;
+ qDeleteAll(outputsToDelete);
#if QT_CONFIG(wayland_datadevice)
delete data_device_manager;
@@ -489,33 +501,35 @@ void QWaylandCompositorPrivate::loadServerBufferIntegration()
/*!
\qmlsignal void QtWaylandCompositor::WaylandCompositor::surfaceRequested(WaylandClient client, int id, int version)
- This signal is emitted when a client has created a surface.
- The slot connecting to this signal may create and initialize
- a WaylandSurface instance in the scope of the slot.
- Otherwise a default surface is created.
+ This signal is emitted when a \a client has created a surface with id \a id.
+ The interface \a version is also available.
+
+ The slot connecting to this signal may create and initialize a WaylandSurface
+ instance in the scope of the slot. Otherwise a default surface is created.
*/
/*!
\fn void QWaylandCompositor::surfaceRequested(QWaylandClient *client, uint id, int version)
- This signal is emitted when a client has created a surface.
- The slot connecting to this signal may create and initialize
- a QWaylandSurface instance in the scope of the slot.
- Otherwise a default surface is created.
+ This signal is emitted when a \a client has created a surface with id \a id.
+ The interface \a version is also available.
+
+ The slot connecting to this signal may create and initialize a QWaylandSurface
+ instance in the scope of the slot. Otherwise a default surface is created.
Connections to this signal must be of Qt::DirectConnection connection type.
*/
/*!
- \qmlsignal void QtWaylandCompositor::WaylandCompositor::surfaceCreated(QWaylandSurface *surface)
+ \qmlsignal void QtWaylandCompositor::WaylandCompositor::surfaceCreated(WaylandSurface surface)
- This signal is emitted when a new WaylandSurface instance has been created.
+ This signal is emitted when a new WaylandSurface instance \a surface has been created.
*/
/*!
\fn void QWaylandCompositor::surfaceCreated(QWaylandSurface *surface)
- This signal is emitted when a new QWaylandSurface instance has been created.
+ This signal is emitted when a new QWaylandSurface instance \a surface has been created.
*/
/*!
diff --git a/src/compositor/compositor_api/qwaylandcompositor.h b/src/compositor/compositor_api/qwaylandcompositor.h
index dfe14293d..b8ca6589a 100644
--- a/src/compositor/compositor_api/qwaylandcompositor.h
+++ b/src/compositor/compositor_api/qwaylandcompositor.h
@@ -74,6 +74,7 @@ class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandCompositor : public QWaylandObject
Q_PROPERTY(QWaylandOutput *defaultOutput READ defaultOutput WRITE setDefaultOutput NOTIFY defaultOutputChanged)
Q_PROPERTY(bool useHardwareIntegrationExtension READ useHardwareIntegrationExtension WRITE setUseHardwareIntegrationExtension NOTIFY useHardwareIntegrationExtensionChanged)
Q_PROPERTY(QWaylandSeat *defaultSeat READ defaultSeat NOTIFY defaultSeatChanged)
+ Q_MOC_INCLUDE("qwaylandseat.h")
public:
QWaylandCompositor(QObject *parent = nullptr);
diff --git a/src/compositor/compositor_api/qwaylanddrag.h b/src/compositor/compositor_api/qwaylanddrag.h
index 71ff723b2..2c66515a6 100644
--- a/src/compositor/compositor_api/qwaylanddrag.h
+++ b/src/compositor/compositor_api/qwaylanddrag.h
@@ -50,6 +50,7 @@ class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandDrag : public QObject
Q_PROPERTY(QWaylandSurface *icon READ icon NOTIFY iconChanged)
Q_PROPERTY(bool visible READ visible NOTIFY iconChanged)
+ Q_MOC_INCLUDE("qwaylandsurface.h")
public:
explicit QWaylandDrag(QWaylandSeat *seat);
diff --git a/src/compositor/compositor_api/qwaylandquickitem.cpp b/src/compositor/compositor_api/qwaylandquickitem.cpp
index 80e84a884..a113b6f09 100644
--- a/src/compositor/compositor_api/qwaylandquickitem.cpp
+++ b/src/compositor/compositor_api/qwaylandquickitem.cpp
@@ -42,11 +42,12 @@
#include <QtWaylandCompositor/private/qwlclientbufferintegration_p.h>
#include <QtWaylandCompositor/private/qwaylandsurface_p.h>
+#include <QtOpenGL/QOpenGLTexture>
+
#include <QtGui/QKeyEvent>
#include <QtGui/QGuiApplication>
#include <QtGui/QScreen>
#include <QtGui/QOpenGLFunctions>
-#include <QtGui/QOpenGLTexture>
#include <QtQuick/QSGSimpleTextureNode>
#include <QtQuick/QQuickWindow>
@@ -74,7 +75,7 @@ static const struct {
QSGMaterialType materialType;
} bufferTypes[] = {
// BufferFormatEgl_Null
- { "", "", 0, 0, false, 0, {} },
+ { "", "", 0, 0, false, {}, {} },
// BufferFormatEgl_RGB
{
@@ -289,8 +290,9 @@ public:
}
auto texture = buffer.toOpenGLTexture();
+ GLuint textureId = texture->textureId();
auto size = surface->bufferSize();
- m_sgTex = surfaceItem->window()->createTextureFromId(texture->textureId(), size, opt);
+ m_sgTex = surfaceItem->window()->createTextureFromNativeObject(QQuickWindow::NativeObjectTexture, &textureId, 0, size, opt);
#else
qCWarning(qLcWaylandCompositor) << "Without OpenGL support only shared memory textures are supported";
#endif
@@ -412,11 +414,14 @@ QWaylandSurface *QWaylandQuickItem::surface() const
void QWaylandQuickItem::setSurface(QWaylandSurface *surface)
{
Q_D(QWaylandQuickItem);
+ QWaylandSurface *oldSurf = d->view->surface();
QWaylandCompositor *oldComp = d->view->surface() ? d->view->surface()->compositor() : nullptr;
d->view->setSurface(surface);
QWaylandCompositor *newComp = d->view->surface() ? d->view->surface()->compositor() : nullptr;
if (oldComp != newComp)
emit compositorChanged();
+ if (oldSurf != surface)
+ emit surfaceChanged();
update();
}
@@ -1009,8 +1014,6 @@ void QWaylandQuickItem::updateSize()
size = surface()->destinationSize() * d->scaleFactor();
setImplicitSize(size.width(), size.height());
- if (d->sizeFollowsSurface)
- setSize(size);
}
/*!
@@ -1057,16 +1060,6 @@ bool QWaylandQuickItem::inputRegionContains(const QPointF &localPosition) const
return false;
}
-// Qt 6: Remove the non-const version
-/*!
- * Returns \c true if the input region of this item's surface contains the
- * position given by \a localPosition.
- */
-bool QWaylandQuickItem::inputRegionContains(const QPointF &localPosition)
-{
- return const_cast<const QWaylandQuickItem *>(this)->inputRegionContains(localPosition);
-}
-
/*!
* \qmlmethod point WaylandQuickItem::mapToSurface(point point)
*
@@ -1118,41 +1111,6 @@ QPointF QWaylandQuickItem::mapFromSurface(const QPointF &point) const
return QPointF(point.x() * xScale, point.y() * yScale);
}
-/*!
- * \qmlproperty bool QtWaylandCompositor::WaylandQuickItem::sizeFollowsSurface
- *
- * This property specifies whether the size of the item should always match
- * the size of its surface.
- *
- * The default is \c true.
- */
-
-/*!
- * \property QWaylandQuickItem::sizeFollowsSurface
- *
- * This property specifies whether the size of the item should always match
- * the size of its surface.
- *
- * The default is \c true.
- */
-bool QWaylandQuickItem::sizeFollowsSurface() const
-{
- Q_D(const QWaylandQuickItem);
- return d->sizeFollowsSurface;
-}
-
-//TODO: sizeFollowsSurface became obsolete when we added an implementation for
-//implicit size. The property is here for compatibility reasons only and should
-//be removed or at least default to false in Qt 6.
-void QWaylandQuickItem::setSizeFollowsSurface(bool sizeFollowsSurface)
-{
- Q_D(QWaylandQuickItem);
- if (d->sizeFollowsSurface == sizeFollowsSurface)
- return;
- d->sizeFollowsSurface = sizeFollowsSurface;
- emit sizeFollowsSurfaceChanged();
-}
-
#if QT_CONFIG(im)
QVariant QWaylandQuickItem::inputMethodQuery(Qt::InputMethodQuery query) const
{
@@ -1183,9 +1141,11 @@ QVariant QWaylandQuickItem::inputMethodQuery(Qt::InputMethodQuery query, QVarian
*/
/*!
- Returns true if the item is hidden, though the texture
+ \property QWaylandQuickItem::paintEnabled
+
+ Holds \c true if the item is hidden, though the texture
is still updated. As opposed to hiding the item by
- setting \l{Item::visible}{visible} to \c false, setting this property to \c false
+ setting \l{QQuickItem::}{visible} to \c false, setting this property to \c false
will not prevent mouse or keyboard input from reaching item.
*/
bool QWaylandQuickItem::paintEnabled() const
@@ -1197,10 +1157,28 @@ bool QWaylandQuickItem::paintEnabled() const
void QWaylandQuickItem::setPaintEnabled(bool enabled)
{
Q_D(QWaylandQuickItem);
- d->paintEnabled = enabled;
+
+ if (enabled != d->paintEnabled) {
+ d->paintEnabled = enabled;
+ emit paintEnabledChanged();
+ }
+
update();
}
+/*!
+ \qmlproperty bool QtWaylandCompositor::WaylandQuickItem::touchEventsEnabled
+
+ This property holds \c true if touch events are forwarded to the client
+ surface, \c false otherwise.
+*/
+
+/*!
+ \property QWaylandQuickItem::touchEventsEnabled
+
+ This property holds \c true if touch events are forwarded to the client
+ surface, \c false otherwise.
+*/
bool QWaylandQuickItem::touchEventsEnabled() const
{
Q_D(const QWaylandQuickItem);
diff --git a/src/compositor/compositor_api/qwaylandquickitem.h b/src/compositor/compositor_api/qwaylandquickitem.h
index 7731933e7..e1eab0869 100644
--- a/src/compositor/compositor_api/qwaylandquickitem.h
+++ b/src/compositor/compositor_api/qwaylandquickitem.h
@@ -53,16 +53,16 @@ class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandQuickItem : public QQuickItem
Q_DECLARE_PRIVATE(QWaylandQuickItem)
Q_PROPERTY(QWaylandCompositor *compositor READ compositor NOTIFY compositorChanged)
Q_PROPERTY(QWaylandSurface *surface READ surface WRITE setSurface NOTIFY surfaceChanged)
- Q_PROPERTY(bool paintEnabled READ paintEnabled WRITE setPaintEnabled)
+ Q_PROPERTY(bool paintEnabled READ paintEnabled WRITE setPaintEnabled NOTIFY paintEnabledChanged)
Q_PROPERTY(bool touchEventsEnabled READ touchEventsEnabled WRITE setTouchEventsEnabled NOTIFY touchEventsEnabledChanged)
Q_PROPERTY(QWaylandSurface::Origin origin READ origin NOTIFY originChanged)
Q_PROPERTY(bool inputEventsEnabled READ inputEventsEnabled WRITE setInputEventsEnabled NOTIFY inputEventsEnabledChanged)
Q_PROPERTY(bool focusOnClick READ focusOnClick WRITE setFocusOnClick NOTIFY focusOnClickChanged)
- Q_PROPERTY(bool sizeFollowsSurface READ sizeFollowsSurface WRITE setSizeFollowsSurface NOTIFY sizeFollowsSurfaceChanged)
Q_PROPERTY(QObject *subsurfaceHandler READ subsurfaceHandler WRITE setSubsurfaceHandler NOTIFY subsurfaceHandlerChanged)
Q_PROPERTY(QWaylandOutput *output READ output WRITE setOutput NOTIFY outputChanged)
Q_PROPERTY(bool bufferLocked READ isBufferLocked WRITE setBufferLocked NOTIFY bufferLockedChanged)
Q_PROPERTY(bool allowDiscardFrontBuffer READ allowDiscardFrontBuffer WRITE setAllowDiscardFrontBuffer NOTIFY allowDiscardFrontBufferChanged)
+ Q_MOC_INCLUDE("qwaylandcompositor.h")
public:
QWaylandQuickItem(QQuickItem *parent = nullptr);
~QWaylandQuickItem() override;
@@ -90,13 +90,9 @@ public:
void setFocusOnClick(bool focus);
bool inputRegionContains(const QPointF &localPosition) const;
- bool inputRegionContains(const QPointF &localPosition);
Q_INVOKABLE QPointF mapToSurface(const QPointF &point) const;
Q_REVISION(13) Q_INVOKABLE QPointF mapFromSurface(const QPointF &point) const;
- bool sizeFollowsSurface() const;
- void setSizeFollowsSurface(bool sizeFollowsSurface);
-
#if QT_CONFIG(im)
QVariant inputMethodQuery(Qt::InputMethodQuery query) const override;
Q_INVOKABLE QVariant inputMethodQuery(Qt::InputMethodQuery query, QVariant argument) const;
@@ -168,6 +164,7 @@ private Q_SLOTS:
Q_SIGNALS:
void surfaceChanged();
void compositorChanged();
+ void paintEnabledChanged();
void touchEventsEnabledChanged();
void originChanged();
void surfaceDestroyed();
@@ -175,7 +172,6 @@ Q_SIGNALS:
void focusOnClickChanged();
void mouseMove(const QPointF &windowPosition);
void mouseRelease();
- void sizeFollowsSurfaceChanged();
void subsurfaceHandlerChanged();
void outputChanged();
void bufferLockedChanged();
diff --git a/src/compositor/compositor_api/qwaylandquickitem_p.h b/src/compositor/compositor_api/qwaylandquickitem_p.h
index a75cdb2ba..8ab82d728 100644
--- a/src/compositor/compositor_api/qwaylandquickitem_p.h
+++ b/src/compositor/compositor_api/qwaylandquickitem_p.h
@@ -161,7 +161,6 @@ public:
bool isDragging = false;
bool newTexture = false;
bool focusOnClick = true;
- bool sizeFollowsSurface = true;
bool belowParent = false;
QPointF hoverPos;
QMatrix4x4 lastMatrix;
diff --git a/src/compositor/compositor_api/qwaylandseat.cpp b/src/compositor/compositor_api/qwaylandseat.cpp
index 0be10f450..83d0335c4 100644
--- a/src/compositor/compositor_api/qwaylandseat.cpp
+++ b/src/compositor/compositor_api/qwaylandseat.cpp
@@ -498,11 +498,13 @@ void QWaylandSeat::sendFullKeyEvent(QKeyEvent *event)
* \qmlmethod void QtWaylandCompositor::WaylandSeat::sendKeyEvent(int qtKey, bool pressed)
* \since 5.12
*
- * Sends a key press or release to the keyboard device.
+ * Sends a key press (if \a pressed is \c true) or release (if \a pressed is \c false)
+ * event of a key \a qtKey to the keyboard device.
*/
/*!
- * Sends a key press or release to the keyboard device.
+ * Sends a key press (if \a pressed is \c true) or release (if \a pressed is \c false)
+ * event of a key \a qtKey to the keyboard device.
*
* \since 5.12
*/
@@ -734,6 +736,10 @@ void QWaylandSeat::handleMouseFocusDestroyed()
* This signal is emitted when the client has requested for a specific \a surface to be the mouse
* cursor. For example, when the user hovers over a particular surface, and you want the cursor
* to change into a resize arrow.
+ *
+ * Both \a hotspotX and \a hotspotY are offsets from the top-left of a pointer surface, where a
+ * click should happen. For example, if the requested cursor surface is an arrow, the parameters
+ * indicate where the arrow's tip is, on that surface.
*/
/*!
diff --git a/src/compositor/compositor_api/qwaylandseat.h b/src/compositor/compositor_api/qwaylandseat.h
index 0acaf670a..c3e83c7e6 100644
--- a/src/compositor/compositor_api/qwaylandseat.h
+++ b/src/compositor/compositor_api/qwaylandseat.h
@@ -59,8 +59,10 @@ class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandSeat : public QWaylandObject
#if QT_CONFIG(draganddrop)
Q_PROPERTY(QWaylandDrag *drag READ drag CONSTANT)
+ Q_MOC_INCLUDE("qwaylanddrag.h")
#endif
Q_PROPERTY(QWaylandKeymap *keymap READ keymap CONSTANT)
+ Q_MOC_INCLUDE("qwaylandkeymap.h")
public:
enum CapabilityFlag {
// The order should match the enum WL_SEAT_CAPABILITY_*
diff --git a/src/compositor/compositor_api/qwaylandsurface.cpp b/src/compositor/compositor_api/qwaylandsurface.cpp
index 41a678128..2ebb04a35 100644
--- a/src/compositor/compositor_api/qwaylandsurface.cpp
+++ b/src/compositor/compositor_api/qwaylandsurface.cpp
@@ -269,12 +269,8 @@ void QWaylandSurfacePrivate::surface_commit(Resource *)
emit q->damaged(damage);
- if (oldBufferSize != bufferSize) {
+ if (oldBufferSize != bufferSize)
emit q->bufferSizeChanged();
-#if QT_DEPRECATED_SINCE(5, 13)
- emit q->sizeChanged();
-#endif
- }
if (oldBufferScale != bufferScale)
emit q->bufferScaleChanged();
@@ -555,26 +551,6 @@ QSize QWaylandSurface::bufferSize() const
return d->bufferSize;
}
-#if QT_DEPRECATED_SINCE(5, 13)
-/*!
- * \qmlproperty size QtWaylandCompositor::WaylandSurface::size
- * \obsolete use bufferSize or destinationSize instead
- *
- * This property has been deprecated, use \l bufferSize or \l destinationSize instead.
- */
-
-/*!
- * \property QWaylandSurface::size
- * \obsolete use bufferSize or destinationSize instead
- *
- * This property has been deprecated, use \l bufferSize or \l destinationSize instead.
- */
-QSize QWaylandSurface::size() const
-{
- return bufferSize();
-}
-#endif
-
/*!
* \qmlproperty size QtWaylandCompositor::WaylandSurface::bufferScale
*
diff --git a/src/compositor/compositor_api/qwaylandsurface.h b/src/compositor/compositor_api/qwaylandsurface.h
index c2ea20059..7d2653d11 100644
--- a/src/compositor/compositor_api/qwaylandsurface.h
+++ b/src/compositor/compositor_api/qwaylandsurface.h
@@ -74,9 +74,6 @@ class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandSurface : public QWaylandObject
Q_PROPERTY(QRectF sourceGeometry READ sourceGeometry NOTIFY sourceGeometryChanged REVISION 13)
Q_PROPERTY(QSize destinationSize READ destinationSize NOTIFY destinationSizeChanged REVISION 13)
Q_PROPERTY(QSize bufferSize READ bufferSize NOTIFY bufferSizeChanged REVISION 13)
-#if QT_DEPRECATED_SINCE(5, 13)
- Q_PROPERTY(QSize size READ size NOTIFY sizeChanged) // Qt 6: Remove
-#endif
Q_PROPERTY(int bufferScale READ bufferScale NOTIFY bufferScaleChanged)
Q_PROPERTY(Qt::ScreenOrientation contentOrientation READ contentOrientation NOTIFY contentOrientationChanged)
Q_PROPERTY(QWaylandSurface::Origin origin READ origin NOTIFY originChanged)
@@ -108,9 +105,6 @@ public:
QRectF sourceGeometry() const;
QSize destinationSize() const;
-#if QT_DEPRECATED_SINCE(5, 13)
- QT_DEPRECATED QSize size() const;
-#endif
QSize bufferSize() const;
int bufferScale() const;
@@ -161,9 +155,6 @@ Q_SIGNALS:
void childAdded(QWaylandSurface *child);
Q_REVISION(13) void sourceGeometryChanged();
Q_REVISION(13) void destinationSizeChanged();
-#if QT_DEPRECATED_SINCE(5, 13)
- QT_DEPRECATED void sizeChanged();
-#endif
Q_REVISION(13) void bufferSizeChanged();
void bufferScaleChanged();
void offsetForNextFrame(const QPoint &offset);
diff --git a/src/compositor/compositor_api/qwaylandview.h b/src/compositor/compositor_api/qwaylandview.h
index dea5be8b2..9a8247974 100644
--- a/src/compositor/compositor_api/qwaylandview.h
+++ b/src/compositor/compositor_api/qwaylandview.h
@@ -51,6 +51,7 @@ class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandView : public QObject
Q_PROPERTY(QWaylandOutput *output READ output WRITE setOutput NOTIFY outputChanged)
Q_PROPERTY(bool bufferLocked READ isBufferLocked WRITE setBufferLocked NOTIFY bufferLockedChanged)
Q_PROPERTY(bool allowDiscardFrontBuffer READ allowDiscardFrontBuffer WRITE setAllowDiscardFrontBuffer NOTIFY allowDiscardFrontBufferChanged)
+ Q_MOC_INCLUDE("qwaylandoutput.h")
public:
QWaylandView(QObject *renderObject = nullptr, QObject *parent = nullptr);
~QWaylandView() override;
diff --git a/src/compositor/configure.json b/src/compositor/configure.json
index 0377dd7be..5b348c12b 100644
--- a/src/compositor/configure.json
+++ b/src/compositor/configure.json
@@ -137,7 +137,7 @@
"#endif"
]
},
- "use": "egl"
+ "use": "egl drm"
},
"dmabuf-client-buffer": {
"label": "Linux Client dma-buf Buffer Sharing",
@@ -161,12 +161,15 @@
"return 0;"
]
},
- "use": "egl"
+ "use": "egl drm"
},
"vulkan-server-buffer": {
"label": "Vulkan Buffer Sharing",
"type": "compile",
"test": {
+ "head": [
+ "#define VK_USE_PLATFORM_WAYLAND_KHR 1"
+ ],
"include": [
"vulkan/vulkan.h"
],
@@ -232,7 +235,7 @@
},
"wayland-vulkan-server-buffer": {
"label": "Vulkan-based server buffer integration",
- "condition": "features.wayland-server && features.opengl && features.egl && tests.vulkan-server-buffer",
+ "condition": "features.wayland-server && features.vulkan && features.opengl && features.egl && tests.vulkan-server-buffer",
"output": [ "privateFeature" ]
},
"wayland-shm-emulation-server-buffer": {
diff --git a/src/compositor/doc/src/qtwaylandcompositor-overview.qdoc b/src/compositor/doc/src/qtwaylandcompositor-overview.qdoc
index 440a793cb..dc95dc5be 100644
--- a/src/compositor/doc/src/qtwaylandcompositor-overview.qdoc
+++ b/src/compositor/doc/src/qtwaylandcompositor-overview.qdoc
@@ -54,7 +54,7 @@
Communication (IPC). Qt provides the APIs that can be used to develop the
remaining parts of an application manager in other modules. The
\l {https://www.qt.io/qt-automotive-suite/}{Qt Automotive Suite} provides
- \l{Qt Application Manager}, which is a complete application manager that
+ \l{https://doc.qt.io/QtApplicationManager}{Qt Application Manager}, which is a complete application manager that
includes a compositor developed using Qt Wayland Compositor.
For more information on Wayland, see \l{Wayland and Qt}.
diff --git a/src/compositor/extensions/qwaylandidleinhibitv1.cpp b/src/compositor/extensions/qwaylandidleinhibitv1.cpp
index b97f58130..d034c47fb 100644
--- a/src/compositor/extensions/qwaylandidleinhibitv1.cpp
+++ b/src/compositor/extensions/qwaylandidleinhibitv1.cpp
@@ -45,7 +45,7 @@ QT_BEGIN_NAMESPACE
\class QWaylandIdleInhibitManagerV1
\inmodule QtWaylandCompositor
\since 5.14
- \brief Provides an extension that allows to inhibit the idle behavior of the compositor
+ \brief Provides an extension that allows to inhibit the idle behavior of the compositor.
\sa QWaylandSurface::inhibitsIdle
The QWaylandIdleInhibitV1 extension provides a way for a client to inhibit the idle behavior of
@@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE
\qmltype IdleInhibitManagerV1
\inqmlmodule QtWayland.Compositor
\since 5.14
- \brief Provides an extension that allows to inhibit the idle behavior of the compositor
+ \brief Provides an extension that allows to inhibit the idle behavior of the compositor.
\sa WaylandSurface::inhibitsIdle
The IdleInhibitManagerV1 extension provides a way for a client to inhibit the idle behavior of
diff --git a/src/compositor/extensions/qwaylandiviapplication.cpp b/src/compositor/extensions/qwaylandiviapplication.cpp
index d0422a052..50242ab19 100644
--- a/src/compositor/extensions/qwaylandiviapplication.cpp
+++ b/src/compositor/extensions/qwaylandiviapplication.cpp
@@ -145,7 +145,7 @@ QByteArray QWaylandIviApplication::interfaceName()
*
* This signal is emitted when the client has requested an \c ivi_surface to be associated
* with \a surface, which is identified by \a iviId. The handler for this signal is
- * expected to create the ivi surface and initialize it within the scope of the
+ * expected to create the ivi surface for \a resource and initialize it within the scope of the
* signal emission. If no ivi surface is created, a default one will be created instead.
*/
diff --git a/src/compositor/extensions/qwaylandivisurface.h b/src/compositor/extensions/qwaylandivisurface.h
index fa5a7c7e0..acdff548f 100644
--- a/src/compositor/extensions/qwaylandivisurface.h
+++ b/src/compositor/extensions/qwaylandivisurface.h
@@ -50,6 +50,7 @@ class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandIviSurface : public QWaylandShellSurfa
Q_WAYLAND_COMPOSITOR_DECLARE_QUICK_CHILDREN(QWaylandIviSurface)
Q_PROPERTY(QWaylandSurface *surface READ surface NOTIFY surfaceChanged)
Q_PROPERTY(uint iviId READ iviId NOTIFY iviIdChanged)
+ Q_MOC_INCLUDE("qwaylandsurface.h")
public:
QWaylandIviSurface();
diff --git a/src/compositor/extensions/qwaylandquickshellintegration.cpp b/src/compositor/extensions/qwaylandquickshellintegration.cpp
index 5d3d526f1..100e4bd59 100644
--- a/src/compositor/extensions/qwaylandquickshellintegration.cpp
+++ b/src/compositor/extensions/qwaylandquickshellintegration.cpp
@@ -33,7 +33,7 @@
* \class QWaylandQuickShellIntegration
* \inmodule QtWaylandCompositor
* \since 5.14
- * \brief Provides support for shell surface integration with QtQuick
+ * \brief Provides support for shell surface integration with QtQuick.
*
* Shell surface implementations should inherit from this class in order to provide
* an integration between the shell surface and QtQuick.
diff --git a/src/compositor/extensions/qwaylandquickshellsurfaceitem.h b/src/compositor/extensions/qwaylandquickshellsurfaceitem.h
index 39949a8fa..38af56454 100644
--- a/src/compositor/extensions/qwaylandquickshellsurfaceitem.h
+++ b/src/compositor/extensions/qwaylandquickshellsurfaceitem.h
@@ -45,6 +45,7 @@ class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandQuickShellSurfaceItem : public QWaylan
Q_PROPERTY(QWaylandShellSurface *shellSurface READ shellSurface WRITE setShellSurface NOTIFY shellSurfaceChanged)
Q_PROPERTY(QQuickItem *moveItem READ moveItem WRITE setMoveItem NOTIFY moveItemChanged)
Q_PROPERTY(bool autoCreatePopupItems READ autoCreatePopupItems WRITE setAutoCreatePopupItems NOTIFY autoCreatePopupItemsChanged)
+ Q_MOC_INCLUDE("qwaylandshellsurface.h")
public:
QWaylandQuickShellSurfaceItem(QQuickItem *parent = nullptr);
~QWaylandQuickShellSurfaceItem() override;
diff --git a/src/compositor/extensions/qwaylandquickshellsurfaceitem_p.h b/src/compositor/extensions/qwaylandquickshellsurfaceitem_p.h
index 27163145e..24f381602 100644
--- a/src/compositor/extensions/qwaylandquickshellsurfaceitem_p.h
+++ b/src/compositor/extensions/qwaylandquickshellsurfaceitem_p.h
@@ -64,13 +64,7 @@ public:
QWaylandQuickShellIntegration *m_shellIntegration = nullptr;
QWaylandShellSurface *m_shellSurface = nullptr;
QQuickItem *m_moveItem = nullptr;
- bool m_autoCreatePopupItems =
-#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
- true;
-#else
- false;
-#endif
-
+ bool m_autoCreatePopupItems = true;
};
class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandQuickShellEventFilter : public QObject
diff --git a/src/compositor/extensions/qwaylandshell.cpp b/src/compositor/extensions/qwaylandshell.cpp
index 45f80114e..dcb8875d4 100644
--- a/src/compositor/extensions/qwaylandshell.cpp
+++ b/src/compositor/extensions/qwaylandshell.cpp
@@ -92,14 +92,4 @@ QWaylandShell::QWaylandShell(QWaylandObject *container, QWaylandShellPrivate &dd
{
}
-QWaylandShell::QWaylandShell(QWaylandCompositorExtensionPrivate &dd)
- : QWaylandShell(static_cast<QWaylandShellPrivate &>(dd))
-{
-}
-
-QWaylandShell::QWaylandShell(QWaylandObject *container, QWaylandCompositorExtensionPrivate &dd)
- : QWaylandShell(container, static_cast<QWaylandShellPrivate &>(dd))
-{
-}
-
QT_END_NAMESPACE
diff --git a/src/compositor/extensions/qwaylandshell.h b/src/compositor/extensions/qwaylandshell.h
index a572b3d6e..bb7c73c1d 100644
--- a/src/compositor/extensions/qwaylandshell.h
+++ b/src/compositor/extensions/qwaylandshell.h
@@ -60,10 +60,6 @@ Q_SIGNALS:
protected:
explicit QWaylandShell(QWaylandShellPrivate &dd);
explicit QWaylandShell(QWaylandObject *container, QWaylandShellPrivate &dd);
-
- //Qt 6: remove
- Q_DECL_DEPRECATED QWaylandShell(QWaylandCompositorExtensionPrivate &dd);
- Q_DECL_DEPRECATED QWaylandShell(QWaylandObject *container, QWaylandCompositorExtensionPrivate &dd);
};
template <typename T>
diff --git a/src/compositor/extensions/qwaylandshellsurface.cpp b/src/compositor/extensions/qwaylandshellsurface.cpp
index 6fda778f6..74194b35e 100644
--- a/src/compositor/extensions/qwaylandshellsurface.cpp
+++ b/src/compositor/extensions/qwaylandshellsurface.cpp
@@ -64,7 +64,7 @@
* \fn QWaylandQuickShellIntegration *QWaylandShellSurface::createIntegration(QWaylandQuickShellSurfaceItem *item)
*
* Creates a QWaylandQuickShellIntegration for this QWaylandQuickShellSurface. It's called
- * automatically when QWaylandQuickShellSurfaceItem::shellSurface is assigned.
+ * automatically when \a {item}'s \l {QWaylandQuickShellSurfaceItem::}{shellSurface} is assigned.
*
* \sa QWaylandQuickShellSurfaceItem
*/
diff --git a/src/compositor/extensions/qwaylandwlshell.h b/src/compositor/extensions/qwaylandwlshell.h
index 117d24a23..8f9ed09df 100644
--- a/src/compositor/extensions/qwaylandwlshell.h
+++ b/src/compositor/extensions/qwaylandwlshell.h
@@ -83,6 +83,7 @@ class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandWlShellSurface : public QWaylandShellS
Q_PROPERTY(QWaylandWlShell *shell READ shell NOTIFY shellChanged)
Q_PROPERTY(QString title READ title NOTIFY titleChanged)
Q_PROPERTY(QString className READ className NOTIFY classNameChanged)
+ Q_MOC_INCLUDE("qwaylandsurface.h")
public:
enum FullScreenMethod {
diff --git a/src/compositor/extensions/qwaylandxdgoutputv1.cpp b/src/compositor/extensions/qwaylandxdgoutputv1.cpp
index 2ab26c162..817cb2e4a 100644
--- a/src/compositor/extensions/qwaylandxdgoutputv1.cpp
+++ b/src/compositor/extensions/qwaylandxdgoutputv1.cpp
@@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE
* \qmltype XdgOutputManagerV1
* \inqmlmodule QtWayland.Compositor
* \since 5.14
- * \brief Provides an extension for describing outputs in a desktop oriented fashion
+ * \brief Provides an extension for describing outputs in a desktop oriented fashion.
*
* The XdgOutputManagerV1 extension provides a way for a compositor to describe outputs in a way
* that is more in line with the concept of an output on desktop oriented systems.
@@ -104,7 +104,7 @@ QT_BEGIN_NAMESPACE
* \class QWaylandXdgOutputManagerV1
* \inmodule QtWaylandCompositor
* \since 5.14
- * \brief Provides an extension for describing outputs in a desktop oriented fashion
+ * \brief Provides an extension for describing outputs in a desktop oriented fashion.
*
* The QWaylandXdgOutputManagerV1 extension provides a way for a compositor to describe outputs in a way
* that is more in line with the concept of an output on desktop oriented systems.
diff --git a/src/compositor/extensions/qwaylandxdgoutputv1.h b/src/compositor/extensions/qwaylandxdgoutputv1.h
index 957ac3bed..b4e10c671 100644
--- a/src/compositor/extensions/qwaylandxdgoutputv1.h
+++ b/src/compositor/extensions/qwaylandxdgoutputv1.h
@@ -74,6 +74,7 @@ class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandXdgOutputV1 : public QObject
Q_PROPERTY(QPoint logicalPosition READ logicalPosition WRITE setLogicalPosition NOTIFY logicalPositionChanged)
Q_PROPERTY(QSize logicalSize READ logicalSize WRITE setLogicalSize NOTIFY logicalSizeChanged)
Q_PROPERTY(QRect logicalGeometry READ logicalGeometry NOTIFY logicalGeometryChanged)
+ Q_MOC_INCLUDE("qwaylandoutput.h")
public:
QWaylandXdgOutputV1();
QWaylandXdgOutputV1(QWaylandOutput *output, QWaylandXdgOutputManagerV1 *manager);
diff --git a/src/compositor/extensions/qwaylandxdgshell.cpp b/src/compositor/extensions/qwaylandxdgshell.cpp
index 1b8a3c2e2..6b7e86003 100644
--- a/src/compositor/extensions/qwaylandxdgshell.cpp
+++ b/src/compositor/extensions/qwaylandxdgshell.cpp
@@ -1725,7 +1725,7 @@ Qt::Orientations QWaylandXdgPopup::slideConstraints() const
Q_D(const QWaylandXdgPopup);
const uint flags = d->m_positionerData.constraintAdjustments;
- Qt::Orientations constraints = 0;
+ Qt::Orientations constraints = {};
if (flags & XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_SLIDE_X)
constraints |= Qt::Horizontal;
@@ -1755,7 +1755,7 @@ Qt::Orientations QWaylandXdgPopup::flipConstraints() const
Q_D(const QWaylandXdgPopup);
const uint flags = d->m_positionerData.constraintAdjustments;
- Qt::Orientations constraints = 0;
+ Qt::Orientations constraints = {};
if (flags & XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_FLIP_X)
constraints |= Qt::Horizontal;
@@ -1785,7 +1785,7 @@ Qt::Orientations QWaylandXdgPopup::resizeConstraints() const
Q_D(const QWaylandXdgPopup);
const uint flags = d->m_positionerData.constraintAdjustments;
- Qt::Orientations constraints = 0;
+ Qt::Orientations constraints = {};
if (flags & XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_RESIZE_X)
constraints |= Qt::Horizontal;
diff --git a/src/compositor/extensions/qwaylandxdgshell.h b/src/compositor/extensions/qwaylandxdgshell.h
index 2e3e28180..7b471b969 100644
--- a/src/compositor/extensions/qwaylandxdgshell.h
+++ b/src/compositor/extensions/qwaylandxdgshell.h
@@ -100,6 +100,7 @@ class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandXdgSurface : public QWaylandShellSurfa
Q_PROPERTY(QWaylandXdgToplevel *toplevel READ toplevel NOTIFY toplevelCreated)
Q_PROPERTY(QWaylandXdgPopup *popup READ popup NOTIFY popupCreated)
Q_PROPERTY(QRect windowGeometry READ windowGeometry NOTIFY windowGeometryChanged)
+ Q_MOC_INCLUDE("qwaylandsurface.h")
public:
explicit QWaylandXdgSurface();
@@ -153,7 +154,12 @@ class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandXdgToplevel : public QObject
Q_PROPERTY(bool fullscreen READ fullscreen NOTIFY fullscreenChanged)
Q_PROPERTY(bool resizing READ resizing NOTIFY resizingChanged)
Q_PROPERTY(bool activated READ activated NOTIFY activatedChanged)
+// QDoc fails to parse the property type that includes the keyword 'enum'
+#ifndef Q_CLANG_QDOC
Q_PROPERTY(enum DecorationMode decorationMode READ decorationMode NOTIFY decorationModeChanged)
+#else
+ Q_PROPERTY(DecorationMode decorationMode READ decorationMode NOTIFY decorationModeChanged)
+#endif
public:
enum State : uint {
MaximizedState = 1,
@@ -229,8 +235,8 @@ class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandXdgPopup : public QObject
{
Q_OBJECT
Q_DECLARE_PRIVATE(QWaylandXdgPopup)
- Q_PROPERTY(QWaylandXdgSurface *xdgSurface READ xdgSurface)
- Q_PROPERTY(QWaylandXdgSurface *parentXdgSurface READ parentXdgSurface)
+ Q_PROPERTY(QWaylandXdgSurface *xdgSurface READ xdgSurface CONSTANT)
+ Q_PROPERTY(QWaylandXdgSurface *parentXdgSurface READ parentXdgSurface CONSTANT)
Q_PROPERTY(QRect configuredGeometry READ configuredGeometry NOTIFY configuredGeometryChanged)
// Positioner properties
diff --git a/src/compositor/extensions/qwaylandxdgshell_p.h b/src/compositor/extensions/qwaylandxdgshell_p.h
index 3223abf3a..de48f481d 100644
--- a/src/compositor/extensions/qwaylandxdgshell_p.h
+++ b/src/compositor/extensions/qwaylandxdgshell_p.h
@@ -63,8 +63,8 @@ QT_BEGIN_NAMESPACE
struct Q_WAYLAND_COMPOSITOR_EXPORT QWaylandXdgPositionerData {
QSize size;
QRect anchorRect;
- Qt::Edges anchorEdges = 0;
- Qt::Edges gravityEdges = 0;
+ Qt::Edges anchorEdges = {};
+ Qt::Edges gravityEdges = {};
uint constraintAdjustments = XDG_POSITIONER_CONSTRAINT_ADJUSTMENT_NONE;
QPoint offset;
QWaylandXdgPositionerData();
diff --git a/src/compositor/extensions/qwaylandxdgshellv5.cpp b/src/compositor/extensions/qwaylandxdgshellv5.cpp
index fab3c841a..337540fc3 100644
--- a/src/compositor/extensions/qwaylandxdgshellv5.cpp
+++ b/src/compositor/extensions/qwaylandxdgshellv5.cpp
@@ -591,7 +591,7 @@ QByteArray QWaylandXdgShellV5::interfaceName()
}
/*!
- * \qmlmethod void QtWaylandCompositor::XdgShellV5::ping()
+ * \qmlmethod void QtWaylandCompositor::XdgShellV5::ping(WaylandClient client)
*
* Sends a ping event to the \a client. If the client replies to the event, the
* pong signal will be emitted.
@@ -784,6 +784,36 @@ void QWaylandXdgShellV5::handleFocusChanged(QWaylandSurface *newSurface, QWaylan
*/
/*!
+ \enum QWaylandXdgSurfaceV5::ResizeEdge
+
+ \value NoneEdge
+ No edge defined.
+ \value TopEdge
+ Top egde.
+ \value BottomEdge
+ Bottom edge.
+ \value LeftEdge
+ Left edge.
+ \value TopLeftEdge
+ Top-left edge.
+ \value BottomLeftEdge
+ Bottom-left edge.
+ \value RightEdge
+ Right edge.
+ \value TopRightEdge
+ Top-right edge.
+ \value BottomRightEdge
+ Bottom-right edge.
+ */
+
+/*!
+ * \fn QWaylandXdgSurfaceV5::setTopLevel()
+ *
+ * This signal is emitted when the parent surface is unset, effectively
+ * making the window top level.
+ */
+
+/*!
* \qmlsignal QtWaylandCompositor::XdgSurfaceV5::setTopLevel()
*
* This signal is emitted when the parent surface is unset, effectively
@@ -791,6 +821,13 @@ void QWaylandXdgShellV5::handleFocusChanged(QWaylandSurface *newSurface, QWaylan
*/
/*!
+ * \fn QWaylandXdgSurfaceV5::setTransient()
+ *
+ * This signal is emitted when the parent surface is set, effectively
+ * making the window transient.
+ */
+
+/*!
* \qmlsignal QtWaylandCompositor::XdgSurfaceV5::setTransient()
*
* This signal is emitted when the parent surface is set, effectively
diff --git a/src/compositor/extensions/qwaylandxdgshellv5.h b/src/compositor/extensions/qwaylandxdgshellv5.h
index d0fba5f69..829db9865 100644
--- a/src/compositor/extensions/qwaylandxdgshellv5.h
+++ b/src/compositor/extensions/qwaylandxdgshellv5.h
@@ -96,6 +96,7 @@ class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandXdgSurfaceV5 : public QWaylandShellSur
Q_PROPERTY(QString title READ title NOTIFY titleChanged)
Q_PROPERTY(QString appId READ appId NOTIFY appIdChanged)
Q_PROPERTY(QRect windowGeometry READ windowGeometry NOTIFY windowGeometryChanged)
+ Q_MOC_INCLUDE("qwaylandsurface.h")
Q_PROPERTY(QList<int> states READ statesAsInts NOTIFY statesChanged)
Q_PROPERTY(bool maximized READ maximized NOTIFY maximizedChanged)
diff --git a/src/compositor/extensions/qwaylandxdgshellv6.cpp b/src/compositor/extensions/qwaylandxdgshellv6.cpp
index 934dccb06..94c430aad 100644
--- a/src/compositor/extensions/qwaylandxdgshellv6.cpp
+++ b/src/compositor/extensions/qwaylandxdgshellv6.cpp
@@ -1656,7 +1656,7 @@ Qt::Orientations QWaylandXdgPopupV6::slideConstraints() const
Q_D(const QWaylandXdgPopupV6);
const uint flags = d->m_positionerData.constraintAdjustments;
- Qt::Orientations constraints = 0;
+ Qt::Orientations constraints = {};
if (flags & ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_SLIDE_X)
constraints |= Qt::Horizontal;
@@ -1686,7 +1686,7 @@ Qt::Orientations QWaylandXdgPopupV6::flipConstraints() const
Q_D(const QWaylandXdgPopupV6);
const uint flags = d->m_positionerData.constraintAdjustments;
- Qt::Orientations constraints = 0;
+ Qt::Orientations constraints = {};
if (flags & ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_FLIP_X)
constraints |= Qt::Horizontal;
@@ -1716,7 +1716,7 @@ Qt::Orientations QWaylandXdgPopupV6::resizeConstraints() const
Q_D(const QWaylandXdgPopupV6);
const uint flags = d->m_positionerData.constraintAdjustments;
- Qt::Orientations constraints = 0;
+ Qt::Orientations constraints = {};
if (flags & ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_RESIZE_X)
constraints |= Qt::Horizontal;
diff --git a/src/compositor/extensions/qwaylandxdgshellv6.h b/src/compositor/extensions/qwaylandxdgshellv6.h
index 71f82521a..7b2076cfe 100644
--- a/src/compositor/extensions/qwaylandxdgshellv6.h
+++ b/src/compositor/extensions/qwaylandxdgshellv6.h
@@ -100,6 +100,7 @@ class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandXdgSurfaceV6 : public QWaylandShellSur
Q_PROPERTY(QWaylandXdgToplevelV6 *toplevel READ toplevel NOTIFY toplevelCreated)
Q_PROPERTY(QWaylandXdgPopupV6 *popup READ popup NOTIFY popupCreated)
Q_PROPERTY(QRect windowGeometry READ windowGeometry NOTIFY windowGeometryChanged)
+ Q_MOC_INCLUDE("qwaylandsurface.h")
public:
QWaylandXdgSurfaceV6();
@@ -215,8 +216,8 @@ class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandXdgPopupV6 : public QObject
{
Q_OBJECT
Q_DECLARE_PRIVATE(QWaylandXdgPopupV6)
- Q_PROPERTY(QWaylandXdgSurfaceV6 *xdgSurface READ xdgSurface)
- Q_PROPERTY(QWaylandXdgSurfaceV6 *parentXdgSurface READ parentXdgSurface)
+ Q_PROPERTY(QWaylandXdgSurfaceV6 *xdgSurface READ xdgSurface CONSTANT)
+ Q_PROPERTY(QWaylandXdgSurfaceV6 *parentXdgSurface READ parentXdgSurface CONSTANT)
Q_PROPERTY(QRect configuredGeometry READ configuredGeometry NOTIFY configuredGeometryChanged)
// Positioner properties
diff --git a/src/compositor/extensions/qwaylandxdgshellv6_p.h b/src/compositor/extensions/qwaylandxdgshellv6_p.h
index 457bc2201..f13e73da4 100644
--- a/src/compositor/extensions/qwaylandxdgshellv6_p.h
+++ b/src/compositor/extensions/qwaylandxdgshellv6_p.h
@@ -61,8 +61,8 @@ QT_BEGIN_NAMESPACE
struct Q_WAYLAND_COMPOSITOR_EXPORT QWaylandXdgPositionerV6Data {
QSize size;
QRect anchorRect;
- Qt::Edges anchorEdges = 0;
- Qt::Edges gravityEdges = 0;
+ Qt::Edges anchorEdges = {};
+ Qt::Edges gravityEdges = {};
uint constraintAdjustments = ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_NONE;
QPoint offset;
QWaylandXdgPositionerV6Data();
diff --git a/src/compositor/extensions/qwlqttouch.cpp b/src/compositor/extensions/qwlqttouch.cpp
index 1f92432fb..bd4cad2be 100644
--- a/src/compositor/extensions/qwlqttouch.cpp
+++ b/src/compositor/extensions/qwlqttouch.cpp
@@ -30,6 +30,7 @@
#include "qwlqttouch_p.h"
#include "qwaylandview.h"
#include <QTouchEvent>
+#include <QTouchDevice>
#include <QWindow>
QT_BEGIN_NAMESPACE
diff --git a/src/compositor/extensions/qwltexturesharingextension.cpp b/src/compositor/extensions/qwltexturesharingextension.cpp
index 6f801e956..7c516c6fd 100644
--- a/src/compositor/extensions/qwltexturesharingextension.cpp
+++ b/src/compositor/extensions/qwltexturesharingextension.cpp
@@ -40,7 +40,8 @@
#include <QTimer>
#include <QtGui/private/qtexturefilereader_p.h>
-#include <QtGui/QOpenGLTexture>
+
+#include <QtOpenGL/QOpenGLTexture>
#include <QtGui/QImageReader>
#include <QtQuick/QSGTexture>
@@ -301,13 +302,13 @@ QString QWaylandTextureSharingExtension::getExistingFilePath(const QString &key)
if (key.contains(QLatin1String("../")))
return QString();
- for (auto dir : m_image_dirs) {
+ for (auto dir : qAsConst(m_image_dirs)) {
QString path = dir + key;
if (QFileInfo::exists(path))
return path;
}
- for (auto dir : m_image_dirs) {
+ for (auto dir : qAsConst(m_image_dirs)) {
for (auto ext : m_image_suffixes) {
QString fp = dir + key + ext;
//qDebug() << "trying" << fp;