summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-01-25 12:12:45 +0100
committerLiang Qi <liang.qi@qt.io>2017-01-25 12:19:40 +0100
commit44e3a9d321190f2958e1a1bdfa7f840e56355279 (patch)
tree4d167e9d0cfcb59eb6e2dd5ed4f55981627e9339
parente26696524ceb58f4fe0cb7202d873240b6a9478d (diff)
parentf72d63866d3f5820865fcd309b649dc9932518ee (diff)
Merge remote-tracking branch 'origin/5.8' into dev
Conflicts: .qmake.conf examples/wayland/custom-extension/client-common/main.cpp src/client/qwaylandwlshellintegration_p.h src/client/qwaylandxdgshellintegration_p.h src/compositor/compositor_api/qwaylandquickoutput.h src/plugins/shellintegration/ivi-shell/qwaylandivisurface_p.h Change-Id: Ic78c610ddf102b0a185294f625bbfcb9238b0f3c
-rw-r--r--examples/wayland/custom-extension/client-common/customextension.h8
-rw-r--r--examples/wayland/custom-extension/compositor/customextension.h8
-rw-r--r--examples/wayland/custom-extension/cpp-client/main.cpp4
-rw-r--r--examples/wayland/minimal-cpp/compositor.h2
-rw-r--r--examples/wayland/minimal-cpp/window.h4
-rw-r--r--examples/wayland/qwindow-compositor/compositor.cpp79
-rw-r--r--examples/wayland/qwindow-compositor/compositor.h33
-rw-r--r--examples/wayland/qwindow-compositor/window.cpp19
-rw-r--r--examples/wayland/qwindow-compositor/window.h14
-rw-r--r--examples/wayland/server-buffer/client/main.cpp4
-rw-r--r--examples/wayland/server-buffer/compositor/main.cpp2
-rw-r--r--src/client/client.pro32
-rw-r--r--src/client/global/qwaylandclientextension.h2
-rw-r--r--src/client/hardwareintegration/qwaylandhardwareintegration_p.h4
-rw-r--r--src/client/qwaylandclipboard_p.h8
-rw-r--r--src/client/qwaylandcursor_p.h11
-rw-r--r--src/client/qwaylanddatadevice.cpp6
-rw-r--r--src/client/qwaylanddatadevice_p.h12
-rw-r--r--src/client/qwaylanddataoffer_p.h8
-rw-r--r--src/client/qwaylanddatasource.cpp10
-rw-r--r--src/client/qwaylanddatasource_p.h6
-rw-r--r--src/client/qwaylanddisplay.cpp2
-rw-r--r--src/client/qwaylanddisplay_p.h4
-rw-r--r--src/client/qwaylanddnd_p.h12
-rw-r--r--src/client/qwaylandextendedsurface_p.h6
-rw-r--r--src/client/qwaylandinputcontext_p.h52
-rw-r--r--src/client/qwaylandinputdevice.cpp10
-rw-r--r--src/client/qwaylandinputdevice_p.h40
-rw-r--r--src/client/qwaylandintegration.cpp10
-rw-r--r--src/client/qwaylandintegration_p.h38
-rw-r--r--src/client/qwaylandnativeinterface_p.h18
-rw-r--r--src/client/qwaylandqtkey_p.h2
-rw-r--r--src/client/qwaylandscreen.cpp8
-rw-r--r--src/client/qwaylandscreen_p.h36
-rw-r--r--src/client/qwaylandshmbackingstore_p.h14
-rw-r--r--src/client/qwaylandshmwindow_p.h4
-rw-r--r--src/client/qwaylandtouch_p.h4
-rw-r--r--src/client/qwaylandwindow.cpp11
-rw-r--r--src/client/qwaylandwindow_p.h42
-rw-r--r--src/client/qwaylandwindowmanagerintegration_p.h10
-rw-r--r--src/client/qwaylandwlshellintegration_p.h4
-rw-r--r--src/client/qwaylandwlshellsurface_p.h32
-rw-r--r--src/client/qwaylandxdgshell_p.h2
-rw-r--r--src/client/qwaylandxdgshellintegration_p.h6
-rw-r--r--src/client/qwaylandxdgsurface_p.h30
-rw-r--r--src/compositor/compositor_api/compositor_api.pri22
-rw-r--r--src/compositor/compositor_api/qwaylandcompositor.cpp2
-rw-r--r--src/compositor/compositor_api/qwaylandcompositor_p.h6
-rw-r--r--src/compositor/compositor_api/qwaylandinputmethodcontrol.cpp4
-rw-r--r--src/compositor/compositor_api/qwaylandinputmethodcontrol.h4
-rw-r--r--src/compositor/compositor_api/qwaylandkeyboard_p.h6
-rw-r--r--src/compositor/compositor_api/qwaylandoutput.cpp10
-rw-r--r--src/compositor/compositor_api/qwaylandoutput.h2
-rw-r--r--src/compositor/compositor_api/qwaylandoutput_p.h2
-rw-r--r--src/compositor/compositor_api/qwaylandpointer_p.h6
-rw-r--r--src/compositor/compositor_api/qwaylandquickcompositor.cpp4
-rw-r--r--src/compositor/compositor_api/qwaylandquickcompositor.h8
-rw-r--r--src/compositor/compositor_api/qwaylandquickitem.cpp25
-rw-r--r--src/compositor/compositor_api/qwaylandquickitem.h33
-rw-r--r--src/compositor/compositor_api/qwaylandquickitem_p.h13
-rw-r--r--src/compositor/compositor_api/qwaylandquickoutput.h4
-rw-r--r--src/compositor/compositor_api/qwaylandseat.cpp2
-rw-r--r--src/compositor/compositor_api/qwaylandseat_p.h10
-rw-r--r--src/compositor/compositor_api/qwaylandsurface.cpp6
-rw-r--r--src/compositor/compositor_api/qwaylandsurface.h2
-rw-r--r--src/compositor/compositor_api/qwaylandsurface_p.h22
-rw-r--r--src/compositor/compositor_api/qwaylandtouch_p.h2
-rw-r--r--src/compositor/extensions/qwaylandiviapplication.h2
-rw-r--r--src/compositor/extensions/qwaylandiviapplication_p.h2
-rw-r--r--src/compositor/extensions/qwaylandivisurface.cpp2
-rw-r--r--src/compositor/extensions/qwaylandivisurface.h4
-rw-r--r--src/compositor/extensions/qwaylandivisurface_p.h4
-rw-r--r--src/compositor/extensions/qwaylandqtwindowmanager.h2
-rw-r--r--src/compositor/extensions/qwaylandqtwindowmanager_p.h6
-rw-r--r--src/compositor/extensions/qwaylandquickshellsurfaceitem.h4
-rw-r--r--src/compositor/extensions/qwaylandquickshellsurfaceitem_p.h4
-rw-r--r--src/compositor/extensions/qwaylandshell.h2
-rw-r--r--src/compositor/extensions/qwaylandshellsurface.h2
-rw-r--r--src/compositor/extensions/qwaylandtextinput_p.h26
-rw-r--r--src/compositor/extensions/qwaylandtextinputmanager.h2
-rw-r--r--src/compositor/extensions/qwaylandtextinputmanager_p.h2
-rw-r--r--src/compositor/extensions/qwaylandwlshell.h4
-rw-r--r--src/compositor/extensions/qwaylandwlshell_p.h24
-rw-r--r--src/compositor/extensions/qwaylandwlshellintegration.cpp17
-rw-r--r--src/compositor/extensions/qwaylandwlshellintegration_p.h5
-rw-r--r--src/compositor/extensions/qwaylandxdgshellv5.cpp38
-rw-r--r--src/compositor/extensions/qwaylandxdgshellv5.h8
-rw-r--r--src/compositor/extensions/qwaylandxdgshellv5_p.h54
-rw-r--r--src/compositor/extensions/qwaylandxdgshellv5integration_p.h4
-rw-r--r--src/compositor/extensions/qwlextendedsurface_p.h12
-rw-r--r--src/compositor/extensions/qwlqttouch_p.h4
-rw-r--r--src/compositor/global/qwaylandcompositorextension.h4
-rw-r--r--src/compositor/global/qwaylandquickextension.h4
-rw-r--r--src/compositor/wayland_wrapper/qwlclientbuffer.cpp2
-rw-r--r--src/compositor/wayland_wrapper/qwlclientbuffer_p.h6
-rw-r--r--src/compositor/wayland_wrapper/qwldatadevice_p.h4
-rw-r--r--src/compositor/wayland_wrapper/qwldatadevicemanager_p.h4
-rw-r--r--src/compositor/wayland_wrapper/qwldataoffer_p.h8
-rw-r--r--src/compositor/wayland_wrapper/qwldatasource_p.h6
-rw-r--r--src/compositor/wayland_wrapper/qwlregion_p.h8
-rw-r--r--src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.h8
-rw-r--r--src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.h6
-rw-r--r--src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h10
-rw-r--r--src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.h10
-rw-r--r--src/hardwareintegration/client/libhybris-egl-server/libhybriseglserverbufferintegration.h12
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.h16
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h10
-rw-r--r--src/hardwareintegration/client/wayland-egl/qwaylandglcontext.h16
-rw-r--r--src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.h10
-rw-r--r--src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.h4
-rw-r--r--src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.h4
-rw-r--r--src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.h10
-rw-r--r--src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.h10
-rw-r--r--src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.h4
-rw-r--r--src/hardwareintegration/compositor/brcm-egl/brcmbuffer.h4
-rw-r--r--src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.h16
-rw-r--r--src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.h8
-rw-r--r--src/hardwareintegration/compositor/libhybris-egl-server/libhybriseglserverbufferintegration.h8
-rw-r--r--src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp4
-rw-r--r--src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h16
-rw-r--r--src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.h8
-rw-r--r--src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.h8
-rw-r--r--src/hardwareintegration/compositor/xcomposite_share/xcompositebuffer.h4
-rw-r--r--src/hardwareintegration/compositor/xcomposite_share/xcompositehandler.h4
-rw-r--r--src/imports/compositor/qwaylandmousetracker.cpp4
-rw-r--r--src/imports/compositor/qwaylandmousetracker_p.h10
-rw-r--r--src/imports/compositor/qwaylandquickcompositorplugin.cpp1
-rw-r--r--src/plugins/decorations/bradient/bradient.pro1
-rw-r--r--src/plugins/decorations/bradient/main.cpp30
-rw-r--r--src/plugins/hardwareintegration/client/brcm-egl/brcm-egl.pro1
-rw-r--r--src/plugins/hardwareintegration/client/brcm-egl/main.cpp2
-rw-r--r--src/plugins/hardwareintegration/client/drm-egl-server/drm-egl-server.pro1
-rw-r--r--src/plugins/hardwareintegration/client/drm-egl-server/main.cpp2
-rw-r--r--src/plugins/hardwareintegration/client/libhybris-egl-server/libhybris-egl-server.pro1
-rw-r--r--src/plugins/hardwareintegration/client/libhybris-egl-server/main.cpp2
-rw-r--r--src/plugins/hardwareintegration/client/wayland-egl/main.cpp2
-rw-r--r--src/plugins/hardwareintegration/client/wayland-egl/wayland-egl.pro1
-rw-r--r--src/plugins/hardwareintegration/client/xcomposite-egl/main.cpp2
-rw-r--r--src/plugins/hardwareintegration/client/xcomposite-egl/xcomposite-egl.pro1
-rw-r--r--src/plugins/hardwareintegration/client/xcomposite-glx/main.cpp2
-rw-r--r--src/plugins/hardwareintegration/client/xcomposite-glx/xcomposite-glx.pro1
-rw-r--r--src/plugins/hardwareintegration/compositor/brcm-egl/brcm-egl.pro1
-rw-r--r--src/plugins/hardwareintegration/compositor/brcm-egl/main.cpp6
-rw-r--r--src/plugins/hardwareintegration/compositor/drm-egl-server/drm-egl-server.pro1
-rw-r--r--src/plugins/hardwareintegration/compositor/drm-egl-server/main.cpp2
-rw-r--r--src/plugins/hardwareintegration/compositor/libhybris-egl-server/libhybris-egl-server.pro1
-rw-r--r--src/plugins/hardwareintegration/compositor/wayland-egl/main.cpp6
-rw-r--r--src/plugins/hardwareintegration/compositor/wayland-egl/wayland-egl.pro1
-rw-r--r--src/plugins/hardwareintegration/compositor/xcomposite-egl/main.cpp6
-rw-r--r--src/plugins/hardwareintegration/compositor/xcomposite-egl/xcomposite-egl.pro1
-rw-r--r--src/plugins/hardwareintegration/compositor/xcomposite-glx/main.cpp6
-rw-r--r--src/plugins/hardwareintegration/compositor/xcomposite-glx/xcomposite-glx.pro1
-rw-r--r--src/plugins/platforms/qwayland-brcm-egl/main.cpp6
-rw-r--r--src/plugins/platforms/qwayland-brcm-egl/qwayland-brcm-egl.pro1
-rw-r--r--src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglplatformintegration.h2
-rw-r--r--src/plugins/platforms/qwayland-egl/main.cpp6
-rw-r--r--src/plugins/platforms/qwayland-egl/qwayland-egl.pro1
-rw-r--r--src/plugins/platforms/qwayland-generic/main.cpp2
-rw-r--r--src/plugins/platforms/qwayland-generic/qwayland-generic.pro1
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-egl/main.cpp6
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-egl/qwayland-xcomposite-egl.pro1
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglplatformintegration.h2
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-glx/main.cpp6
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-glx/qwayland-xcomposite-glx.pro1
-rw-r--r--src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxplatformintegration.h2
-rw-r--r--src/plugins/shellintegration/ivi-shell/ivi-shell.pro7
-rw-r--r--src/plugins/shellintegration/ivi-shell/main.cpp2
-rw-r--r--src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.h2
-rw-r--r--src/plugins/shellintegration/ivi-shell/qwaylandivisurface_p.h4
-rw-r--r--tests/auto/client/client/mockinput.h14
-rw-r--r--tests/auto/client/client/mocksurface.h12
-rw-r--r--tests/auto/client/client/tst_client.cpp4
-rw-r--r--tests/auto/compositor/compositor/testcompositor.h4
-rw-r--r--tests/auto/compositor/compositor/testkeyboardgrabber.h8
-rw-r--r--tests/auto/compositor/compositor/testseat.h2
-rw-r--r--tests/auto/compositor/compositor/tst_compositor.cpp6
-rw-r--r--tests/manual/scaling-compositor/main.cpp49
-rw-r--r--tests/manual/scaling-compositor/main.qml84
-rw-r--r--tests/manual/scaling-compositor/qml.qrc5
-rw-r--r--tests/manual/scaling-compositor/scaling-compositor.pro7
-rw-r--r--tests/manual/subsurface/shmwindow.h4
181 files changed, 1076 insertions, 629 deletions
diff --git a/examples/wayland/custom-extension/client-common/customextension.h b/examples/wayland/custom-extension/client-common/customextension.h
index 3b64fc64..9f7fac78 100644
--- a/examples/wayland/custom-extension/client-common/customextension.h
+++ b/examples/wayland/custom-extension/client-common/customextension.h
@@ -69,11 +69,11 @@ private slots:
void handleExtensionActive();
private:
- void example_extension_close(wl_surface *surface) Q_DECL_OVERRIDE;
- void example_extension_set_font_size(wl_surface *surface, uint32_t pixel_size) Q_DECL_OVERRIDE;
- void example_extension_set_window_decoration(uint32_t state) Q_DECL_OVERRIDE;
+ void example_extension_close(wl_surface *surface) override;
+ void example_extension_set_font_size(wl_surface *surface, uint32_t pixel_size) override;
+ void example_extension_set_window_decoration(uint32_t state) override;
- bool eventFilter(QObject *object, QEvent *event) Q_DECL_OVERRIDE;
+ bool eventFilter(QObject *object, QEvent *event) override;
QWindow *windowForSurface(struct ::wl_surface *);
void sendWindowRegistration(QWindow *);
diff --git a/examples/wayland/custom-extension/compositor/customextension.h b/examples/wayland/custom-extension/compositor/customextension.h
index b1b00408..7f09ad0e 100644
--- a/examples/wayland/custom-extension/compositor/customextension.h
+++ b/examples/wayland/custom-extension/compositor/customextension.h
@@ -54,7 +54,7 @@ class CustomExtension : public QWaylandCompositorExtensionTemplate<CustomExtens
Q_OBJECT
public:
CustomExtension(QWaylandCompositor *compositor = 0);
- void initialize() Q_DECL_OVERRIDE;
+ void initialize() override;
signals:
void surfaceAdded(QWaylandSurface *surface);
@@ -67,9 +67,9 @@ public slots:
void close(QWaylandSurface *surface);
protected:
- void example_extension_bounce(Resource *resource, wl_resource *surface, uint32_t duration) Q_DECL_OVERRIDE;
- void example_extension_spin(Resource *resource, wl_resource *surface, uint32_t duration) Q_DECL_OVERRIDE;
- void example_extension_register_surface(Resource *resource, wl_resource *surface) Q_DECL_OVERRIDE;
+ void example_extension_bounce(Resource *resource, wl_resource *surface, uint32_t duration) override;
+ void example_extension_spin(Resource *resource, wl_resource *surface, uint32_t duration) override;
+ void example_extension_register_surface(Resource *resource, wl_resource *surface) override;
};
Q_COMPOSITOR_DECLARE_QUICK_EXTENSION_CLASS(CustomExtension)
diff --git a/examples/wayland/custom-extension/cpp-client/main.cpp b/examples/wayland/custom-extension/cpp-client/main.cpp
index af8de53b..3dbada17 100644
--- a/examples/wayland/custom-extension/cpp-client/main.cpp
+++ b/examples/wayland/custom-extension/cpp-client/main.cpp
@@ -100,7 +100,7 @@ public slots:
}
protected:
- void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE
+ void paintEvent(QPaintEvent *) override
{
QPainter p(this);
p.setFont(m_font);
@@ -113,7 +113,7 @@ protected:
p.drawText(rect3, Qt::TextWordWrap, "Create new window.");
}
- void mousePressEvent(QMouseEvent *ev) Q_DECL_OVERRIDE
+ void mousePressEvent(QMouseEvent *ev) override
{
if (rect1.contains(ev->pos()))
doSpin();
diff --git a/examples/wayland/minimal-cpp/compositor.h b/examples/wayland/minimal-cpp/compositor.h
index e44a8eb5..3ac0311e 100644
--- a/examples/wayland/minimal-cpp/compositor.h
+++ b/examples/wayland/minimal-cpp/compositor.h
@@ -68,7 +68,7 @@ class Compositor : public QWaylandCompositor
public:
Compositor(Window *window);
~Compositor();
- void create() Q_DECL_OVERRIDE;
+ void create() override;
QList<View*> views() const { return m_views; }
diff --git a/examples/wayland/minimal-cpp/window.h b/examples/wayland/minimal-cpp/window.h
index 4df1bc83..16b14c8e 100644
--- a/examples/wayland/minimal-cpp/window.h
+++ b/examples/wayland/minimal-cpp/window.h
@@ -55,8 +55,8 @@ public:
void setCompositor(Compositor *comp);
protected:
- void initializeGL() Q_DECL_OVERRIDE;
- void paintGL() Q_DECL_OVERRIDE;
+ void initializeGL() override;
+ void paintGL() override;
private:
QOpenGLTextureBlitter m_textureBlitter;
diff --git a/examples/wayland/qwindow-compositor/compositor.cpp b/examples/wayland/qwindow-compositor/compositor.cpp
index 4878c373..8d0db525 100644
--- a/examples/wayland/qwindow-compositor/compositor.cpp
+++ b/examples/wayland/qwindow-compositor/compositor.cpp
@@ -56,13 +56,15 @@
#define GL_TEXTURE_EXTERNAL_OES 0x8D65
#endif
-View::View()
- : m_textureTarget(GL_TEXTURE_2D)
+View::View(Compositor *compositor)
+ : m_compositor(compositor)
+ , m_textureTarget(GL_TEXTURE_2D)
, m_texture(0)
, m_wlShellSurface(nullptr)
, m_xdgSurface(nullptr)
, m_xdgPopup(nullptr)
, m_parentView(nullptr)
+ , m_animationFactor(1.0)
{}
QOpenGLTexture *View::getTexture()
@@ -70,16 +72,33 @@ QOpenGLTexture *View::getTexture()
if (advance()) {
QWaylandBufferRef buf = currentBuffer();
m_texture = buf.toOpenGLTexture();
+ if (surface()) {
+ m_size = surface()->size();
+ m_origin = buf.origin() == QWaylandSurface::OriginTopLeft
+ ? QOpenGLTextureBlitter::OriginTopLeft
+ : QOpenGLTextureBlitter::OriginBottomLeft;
+ }
}
return m_texture;
}
+QOpenGLTextureBlitter::Origin View::textureOrigin() const
+{
+ return m_origin;
+}
+
+QSize View::size() const
+{
+ return surface() ? surface()->size() : m_size;
+}
+
bool View::isCursor() const
{
- return surface()->isCursorSurface();
+ return surface() && surface()->isCursorSurface();
}
+
void View::onXdgSetMaximized()
{
m_xdgSurface->sendMaximized(output()->geometry().size());
@@ -117,6 +136,44 @@ void View::onOffsetForNextFrame(const QPoint &offset)
setPosition(position() + offset);
}
+
+void View::timerEvent(QTimerEvent *event)
+{
+ if (event->timerId() != m_animationTimer.timerId())
+ return;
+
+ m_compositor->triggerRender();
+
+ if (m_animationCountUp) {
+ m_animationFactor += .08;
+ if (m_animationFactor > 1.0) {
+ m_animationFactor = 1.0;
+ m_animationTimer.stop();
+ emit animationDone();
+ }
+ } else {
+ m_animationFactor -= .08;
+ if (m_animationFactor < 0.01) {
+ m_animationFactor = 0.01;
+ m_animationTimer.stop();
+ emit animationDone();
+ }
+ }
+}
+
+void View::startAnimation(bool countUp)
+{
+ m_animationCountUp = countUp;
+ m_animationFactor = countUp ? .1 : 1.0;
+ m_animationTimer.start(20, this);
+}
+
+void View::cancelAnimation()
+{
+ m_animationFactor = 1.0;
+ m_animationTimer.stop();
+}
+
void View::onXdgUnsetFullscreen()
{
onXdgUnsetMaximized();
@@ -159,8 +216,7 @@ void Compositor::onSurfaceCreated(QWaylandSurface *surface)
connect(surface, &QWaylandSurface::redraw, this, &Compositor::triggerRender);
connect(surface, &QWaylandSurface::subsurfacePositionChanged, this, &Compositor::onSubsurfacePositionChanged);
-
- View *view = new View;
+ View *view = new View(this);
view->setSurface(surface);
view->setOutput(outputFor(m_window));
m_views << view;
@@ -189,10 +245,20 @@ void Compositor::surfaceDestroyed()
void Compositor::viewSurfaceDestroyed()
{
View *view = qobject_cast<View*>(sender());
+ view->setBufferLocked(true);
+ view->startAnimation(false);
+ connect(view, &View::animationDone, this, &Compositor::viewAnimationDone);
+}
+
+
+void Compositor::viewAnimationDone()
+{
+ View *view = qobject_cast<View*>(sender());
m_views.removeAll(view);
delete view;
}
+
View * Compositor::findView(const QWaylandSurface *s) const
{
Q_FOREACH (View* view, m_views) {
@@ -212,6 +278,7 @@ void Compositor::onWlShellSurfaceCreated(QWaylandWlShellSurface *wlShellSurface)
View *view = findView(wlShellSurface->surface());
Q_ASSERT(view);
view->m_wlShellSurface = wlShellSurface;
+ view->startAnimation(true);
}
void Compositor::onXdgSurfaceCreated(QWaylandXdgSurfaceV5 *xdgSurface)
@@ -227,6 +294,7 @@ void Compositor::onXdgSurfaceCreated(QWaylandXdgSurfaceV5 *xdgSurface)
connect(xdgSurface, &QWaylandXdgSurfaceV5::setFullscreen, view, &View::onXdgSetFullscreen);
connect(xdgSurface, &QWaylandXdgSurfaceV5::unsetMaximized, view, &View::onXdgUnsetMaximized);
connect(xdgSurface, &QWaylandXdgSurfaceV5::unsetFullscreen, view, &View::onXdgUnsetFullscreen);
+ view->startAnimation(true);
}
void Compositor::onXdgPopupRequested(QWaylandSurface *surface, QWaylandSurface *parent,
@@ -291,6 +359,7 @@ void Compositor::onSetPopup(QWaylandSeat *seat, QWaylandSurface *parent, const Q
View *parentView = findView(parent);
if (parentView)
view->setPosition(parentView->position() + relativeToParent);
+ view->cancelAnimation();
}
}
diff --git a/examples/wayland/qwindow-compositor/compositor.h b/examples/wayland/qwindow-compositor/compositor.h
index bf52c8c7..ddc85c48 100644
--- a/examples/wayland/qwindow-compositor/compositor.h
+++ b/examples/wayland/qwindow-compositor/compositor.h
@@ -47,6 +47,7 @@
#include <QtWaylandCompositor/QWaylandWlShellSurface>
#include <QtWaylandCompositor/QWaylandXdgSurfaceV5>
#include <QTimer>
+#include <QOpenGLTextureBlitter>
QT_BEGIN_NAMESPACE
@@ -54,33 +55,51 @@ class QWaylandWlShell;
class QWaylandWlShellSurface;
class QWaylandXdgShellV5;
class QOpenGLTexture;
+class Compositor;
class View : public QWaylandView
{
Q_OBJECT
public:
- View();
+ View(Compositor *compositor);
QOpenGLTexture *getTexture();
+ QOpenGLTextureBlitter::Origin textureOrigin() const;
QPointF position() const { return m_position; }
void setPosition(const QPointF &pos) { m_position = pos; }
+ QSize size() const;
bool isCursor() const;
bool hasShell() const { return m_wlShellSurface; }
void setParentView(View *parent) { m_parentView = parent; }
View *parentView() const { return m_parentView; }
QPointF parentPosition() const { return m_parentView ? (m_parentView->position() + m_parentView->parentPosition()) : QPointF(); }
- QSize windowSize() { return m_xdgSurface ? m_xdgSurface->windowGeometry().size() : surface()->size(); }
+ QSize windowSize() { return m_xdgSurface ? m_xdgSurface->windowGeometry().size() : surface() ? surface()->size() : m_size; }
QPoint offset() const { return m_offset; }
+ qreal animationFactor() const {return m_animationFactor; }
+ void setAnimationFactor(qreal f) {m_animationFactor = f; }
+
+signals:
+ void animationDone();
+
+protected:
+ void timerEvent(QTimerEvent *event);
+
private:
friend class Compositor;
+ Compositor *m_compositor;
GLenum m_textureTarget;
QOpenGLTexture *m_texture;
+ QOpenGLTextureBlitter::Origin m_origin;
QPointF m_position;
+ QSize m_size;
QWaylandWlShellSurface *m_wlShellSurface;
QWaylandXdgSurfaceV5 *m_xdgSurface;
QWaylandXdgPopupV5 *m_xdgPopup;
View *m_parentView;
QPoint m_offset;
+ qreal m_animationFactor;
+ QBasicTimer m_animationTimer;
+ bool m_animationCountUp;
public slots:
void onXdgSetMaximized();
@@ -88,6 +107,9 @@ public slots:
void onXdgSetFullscreen(QWaylandOutput *output);
void onXdgUnsetFullscreen();
void onOffsetForNextFrame(const QPoint &offset);
+
+ void startAnimation(bool countUp);
+ void cancelAnimation();
};
class Compositor : public QWaylandCompositor
@@ -96,7 +118,7 @@ class Compositor : public QWaylandCompositor
public:
Compositor(QWindow *window);
~Compositor();
- void create() Q_DECL_OVERRIDE;
+ void create() override;
void startRender();
void endRender();
@@ -119,6 +141,9 @@ signals:
void dragStarted(View *dragIcon);
void frameOffset(const QPoint &offset);
+public slots:
+ void triggerRender();
+
private slots:
void surfaceHasContentChanged();
void surfaceDestroyed();
@@ -129,7 +154,6 @@ private slots:
void startDrag();
- void triggerRender();
void onSurfaceCreated(QWaylandSurface *surface);
void onWlShellSurfaceCreated(QWaylandWlShellSurface *wlShellSurface);
@@ -143,6 +167,7 @@ private slots:
void onSubsurfacePositionChanged(const QPoint &position);
void updateCursor();
+ void viewAnimationDone();
private:
View *findView(const QWaylandSurface *s) const;
QWindow *m_window;
diff --git a/examples/wayland/qwindow-compositor/window.cpp b/examples/wayland/qwindow-compositor/window.cpp
index 59ef1d56..fcb5fd47 100644
--- a/examples/wayland/qwindow-compositor/window.cpp
+++ b/examples/wayland/qwindow-compositor/window.cpp
@@ -129,18 +129,17 @@ void Window::paintGL()
m_textureBlitter.bind(currentTarget);
}
QWaylandSurface *surface = view->surface();
- if (surface && surface->hasContent()) {
- QSize s = surface->size();
+ if ((surface && surface->hasContent()) || view->isBufferLocked()) {
+ QSize s = view->size();
if (!s.isEmpty()) {
if (m_mouseView == view && m_grabState == ResizeGrab && m_resizeAnchored)
view->setPosition(getAnchoredPosition(m_resizeAnchorPosition, m_resizeEdge, s));
QPointF pos = view->position() + view->parentPosition();
QRectF surfaceGeometry(pos, s);
- QOpenGLTextureBlitter::Origin surfaceOrigin =
- view->currentBuffer().origin() == QWaylandSurface::OriginTopLeft
- ? QOpenGLTextureBlitter::OriginTopLeft
- : QOpenGLTextureBlitter::OriginBottomLeft;
- QMatrix4x4 targetTransform = QOpenGLTextureBlitter::targetTransform(surfaceGeometry, QRect(QPoint(), size()));
+ auto surfaceOrigin = view->textureOrigin();
+ auto sf = view->animationFactor();
+ QRectF targetRect(surfaceGeometry.topLeft() * sf, surfaceGeometry.size() * sf);
+ QMatrix4x4 targetTransform = QOpenGLTextureBlitter::targetTransform(targetRect, QRect(QPoint(), size()));
m_textureBlitter.blit(texture->textureId(), targetTransform, surfaceOrigin);
}
}
@@ -157,10 +156,8 @@ View *Window::viewAt(const QPointF &point)
Q_FOREACH (View *view, m_compositor->views()) {
if (view == m_dragIconView)
continue;
- QPointF topLeft = view->position();
- QWaylandSurface *surface = view->surface();
- QRectF geo(topLeft, surface->size());
- if (geo.contains(point))
+ QRectF geom(view->position(), view->size());
+ if (geom.contains(point))
ret = view;
}
return ret;
diff --git a/examples/wayland/qwindow-compositor/window.h b/examples/wayland/qwindow-compositor/window.h
index 53c85a6e..4d8980f0 100644
--- a/examples/wayland/qwindow-compositor/window.h
+++ b/examples/wayland/qwindow-compositor/window.h
@@ -59,15 +59,15 @@ public:
void setCompositor(Compositor *comp);
protected:
- void initializeGL() Q_DECL_OVERRIDE;
- void paintGL() Q_DECL_OVERRIDE;
+ void initializeGL() override;
+ void paintGL() override;
- void mousePressEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *e) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *e) override;
+ void mouseReleaseEvent(QMouseEvent *e) override;
+ void mouseMoveEvent(QMouseEvent *e) override;
- void keyPressEvent(QKeyEvent *e) Q_DECL_OVERRIDE;
- void keyReleaseEvent(QKeyEvent *e) Q_DECL_OVERRIDE;
+ void keyPressEvent(QKeyEvent *e) override;
+ void keyReleaseEvent(QKeyEvent *e) override;
private slots:
void startMove();
diff --git a/examples/wayland/server-buffer/client/main.cpp b/examples/wayland/server-buffer/client/main.cpp
index 1a2c447a..bab4a942 100644
--- a/examples/wayland/server-buffer/client/main.cpp
+++ b/examples/wayland/server-buffer/client/main.cpp
@@ -144,7 +144,7 @@ public slots:
}
protected:
- void registry_global(uint32_t name, const QString &interface, uint32_t version) Q_DECL_OVERRIDE
+ void registry_global(uint32_t name, const QString &interface, uint32_t version) override
{
Q_UNUSED(version);
if (interface == QStringLiteral("qt_share_buffer")) {
@@ -152,7 +152,7 @@ protected:
}
}
- void share_buffer_cross_buffer(struct ::qt_server_buffer *buffer) Q_DECL_OVERRIDE
+ void share_buffer_cross_buffer(struct ::qt_server_buffer *buffer) override
{
QtWaylandClient::QWaylandServerBuffer *serverBuffer = m_server_buffer_integration->serverBuffer(buffer);
if (m_server_buffer_list.isEmpty()) {
diff --git a/examples/wayland/server-buffer/compositor/main.cpp b/examples/wayland/server-buffer/compositor/main.cpp
index 8c43ce5c..9ac91244 100644
--- a/examples/wayland/server-buffer/compositor/main.cpp
+++ b/examples/wayland/server-buffer/compositor/main.cpp
@@ -215,7 +215,7 @@ protected:
connect(surface, &QWaylandSurface::hasContentChanged, this, &QmlCompositor::surfaceMapped);
}
- void share_buffer_bind_resource(Resource *resource) Q_DECL_OVERRIDE
+ void share_buffer_bind_resource(Resource *resource) override
{
if (m_server_buffer_32_bit) {
struct ::wl_client *client = resource->handle->client;
diff --git a/src/client/client.pro b/src/client/client.pro
index 7d602086..824c715b 100644
--- a/src/client/client.pro
+++ b/src/client/client.pro
@@ -18,7 +18,7 @@ CONFIG += link_pkgconfig wayland-scanner
qtConfig(xkbcommon-evdev): \
QMAKE_USE_PRIVATE += xkbcommon_evdev
-QMAKE_USE += wayland-client wayland-cursor
+QMAKE_USE += wayland-client
INCLUDEPATH += $$PWD/../shared
@@ -36,13 +36,10 @@ SOURCES += qwaylandintegration.cpp \
qwaylandnativeinterface.cpp \
qwaylandshmbackingstore.cpp \
qwaylandinputdevice.cpp \
- qwaylandcursor.cpp \
qwaylanddisplay.cpp \
qwaylandwindow.cpp \
qwaylandscreen.cpp \
qwaylandshmwindow.cpp \
- qwaylandclipboard.cpp \
- qwaylanddnd.cpp \
qwaylanddataoffer.cpp \
qwaylanddatadevicemanager.cpp \
qwaylanddatasource.cpp \
@@ -67,13 +64,11 @@ SOURCES += qwaylandintegration.cpp \
qwaylanddecorationplugin.cpp \
qwaylandwindowmanagerintegration.cpp \
qwaylandinputcontext.cpp \
- qwaylanddatadevice.cpp \
qwaylandshm.cpp \
qwaylandbuffer.cpp \
HEADERS += qwaylandintegration_p.h \
qwaylandnativeinterface_p.h \
- qwaylandcursor_p.h \
qwaylanddisplay_p.h \
qwaylandwindow_p.h \
qwaylandscreen_p.h \
@@ -81,8 +76,6 @@ HEADERS += qwaylandintegration_p.h \
qwaylandinputdevice_p.h \
qwaylandbuffer_p.h \
qwaylandshmwindow_p.h \
- qwaylandclipboard_p.h \
- qwaylanddnd_p.h \
qwaylanddataoffer_p.h \
qwaylanddatadevicemanager_p.h \
qwaylanddatasource_p.h \
@@ -104,7 +97,6 @@ HEADERS += qwaylandintegration_p.h \
qwaylanddecorationplugin_p.h \
qwaylandwindowmanagerintegration_p.h \
qwaylandinputcontext_p.h \
- qwaylanddatadevice_p.h \
qwaylandshm_p.h \
qtwaylandclientglobal.h \
qtwaylandclientglobal_p.h \
@@ -113,11 +105,33 @@ HEADERS += qwaylandintegration_p.h \
../shared/qwaylandxkb_p.h \
../shared/qwaylandsharedmemoryformathelper_p.h \
+qtConfig(clipboard) {
+ HEADERS += qwaylandclipboard_p.h
+ SOURCES += qwaylandclipboard.cpp
+}
+
include(hardwareintegration/hardwareintegration.pri)
include(shellintegration/shellintegration.pri)
include(inputdeviceintegration/inputdeviceintegration.pri)
include(global/global.pri)
+qtConfig(cursor) {
+ QMAKE_USE += wayland-cursor
+
+ HEADERS += \
+ qwaylandcursor_p.h
+ SOURCES += \
+ qwaylandcursor.cpp
+}
+qtConfig(draganddrop) {
+ HEADERS += \
+ qwaylanddnd_p.h \
+ qwaylanddatadevice_p.h
+ SOURCES += \
+ qwaylanddnd.cpp \
+ qwaylanddatadevice.cpp
+}
+
CONFIG += generated_privates
MODULE_PLUGIN_TYPES = \
wayland-graphics-integration-client \
diff --git a/src/client/global/qwaylandclientextension.h b/src/client/global/qwaylandclientextension.h
index abf75324..7e11bb47 100644
--- a/src/client/global/qwaylandclientextension.h
+++ b/src/client/global/qwaylandclientextension.h
@@ -87,7 +87,7 @@ public:
{
}
- const struct wl_interface *extensionInterface() const Q_DECL_OVERRIDE
+ const struct wl_interface *extensionInterface() const override
{
return T::interface();
}
diff --git a/src/client/hardwareintegration/qwaylandhardwareintegration_p.h b/src/client/hardwareintegration/qwaylandhardwareintegration_p.h
index 8b4a7162..31b4209d 100644
--- a/src/client/hardwareintegration/qwaylandhardwareintegration_p.h
+++ b/src/client/hardwareintegration/qwaylandhardwareintegration_p.h
@@ -69,8 +69,8 @@ public:
QString serverBufferIntegration();
protected:
- void hardware_integration_client_backend(const QString &name) Q_DECL_OVERRIDE;
- void hardware_integration_server_backend(const QString &name) Q_DECL_OVERRIDE;
+ void hardware_integration_client_backend(const QString &name) override;
+ void hardware_integration_server_backend(const QString &name) override;
private:
QString m_client_buffer;
diff --git a/src/client/qwaylandclipboard_p.h b/src/client/qwaylandclipboard_p.h
index 584322e0..211a9694 100644
--- a/src/client/qwaylandclipboard_p.h
+++ b/src/client/qwaylandclipboard_p.h
@@ -71,10 +71,10 @@ public:
~QWaylandClipboard();
- QMimeData *mimeData(QClipboard::Mode mode = QClipboard::Clipboard) Q_DECL_OVERRIDE;
- void setMimeData(QMimeData *data, QClipboard::Mode mode = QClipboard::Clipboard) Q_DECL_OVERRIDE;
- bool supportsMode(QClipboard::Mode mode) const Q_DECL_OVERRIDE;
- bool ownsMode(QClipboard::Mode mode) const Q_DECL_OVERRIDE;
+ QMimeData *mimeData(QClipboard::Mode mode = QClipboard::Clipboard) override;
+ void setMimeData(QMimeData *data, QClipboard::Mode mode = QClipboard::Clipboard) override;
+ bool supportsMode(QClipboard::Mode mode) const override;
+ bool ownsMode(QClipboard::Mode mode) const override;
private:
QWaylandDisplay *mDisplay;
diff --git a/src/client/qwaylandcursor_p.h b/src/client/qwaylandcursor_p.h
index a7d188f5..916a464e 100644
--- a/src/client/qwaylandcursor_p.h
+++ b/src/client/qwaylandcursor_p.h
@@ -55,6 +55,8 @@
#include <QtCore/QMap>
#include <QtWaylandClient/qtwaylandclientglobal.h>
+#if QT_CONFIG(cursor)
+
struct wl_cursor;
struct wl_cursor_image;
struct wl_cursor_theme;
@@ -73,10 +75,10 @@ public:
QWaylandCursor(QWaylandScreen *screen);
~QWaylandCursor();
- void changeCursor(QCursor *cursor, QWindow *window) Q_DECL_OVERRIDE;
- void pointerEvent(const QMouseEvent &event) Q_DECL_OVERRIDE;
- QPoint pos() const Q_DECL_OVERRIDE;
- void setPos(const QPoint &pos) Q_DECL_OVERRIDE;
+ void changeCursor(QCursor *cursor, QWindow *window) override;
+ void pointerEvent(const QMouseEvent &event) override;
+ QPoint pos() const override;
+ void setPos(const QPoint &pos) override;
struct wl_cursor_image *cursorImage(Qt::CursorShape shape);
QSharedPointer<QWaylandBuffer> cursorBitmapImage(const QCursor *cursor);
@@ -128,4 +130,5 @@ private:
QT_END_NAMESPACE
+#endif // cursor
#endif // QWAYLANDCURSOR_H
diff --git a/src/client/qwaylanddatadevice.cpp b/src/client/qwaylanddatadevice.cpp
index b76647ea..ebd3ce1b 100644
--- a/src/client/qwaylanddatadevice.cpp
+++ b/src/client/qwaylanddatadevice.cpp
@@ -52,7 +52,9 @@
#include <QtGui/QGuiApplication>
#include <QtGui/private/qguiapplication_p.h>
+#if QT_CONFIG(clipboard)
#include <qpa/qplatformclipboard.h>
+#endif
#include <qpa/qplatformdrag.h>
#include <qpa/qwindowsysteminterface.h>
@@ -235,13 +237,17 @@ void QWaylandDataDevice::data_device_selection(wl_data_offer *id)
else
m_selectionOffer.reset();
+#if QT_CONFIG(clipboard)
QGuiApplicationPrivate::platformIntegration()->clipboard()->emitChanged(QClipboard::Clipboard);
+#endif
}
void QWaylandDataDevice::selectionSourceCancelled()
{
m_selectionSource.reset();
+#if QT_CONFIG(clipboard)
QGuiApplicationPrivate::platformIntegration()->clipboard()->emitChanged(QClipboard::Clipboard);
+#endif
}
void QWaylandDataDevice::dragSourceCancelled()
diff --git a/src/client/qwaylanddatadevice_p.h b/src/client/qwaylanddatadevice_p.h
index 0b16f97d..1ec8761b 100644
--- a/src/client/qwaylanddatadevice_p.h
+++ b/src/client/qwaylanddatadevice_p.h
@@ -92,12 +92,12 @@ public:
void cancelDrag();
protected:
- void data_device_data_offer(struct ::wl_data_offer *id) Q_DECL_OVERRIDE;
- void data_device_drop() Q_DECL_OVERRIDE;
- void data_device_enter(uint32_t serial, struct ::wl_surface *surface, wl_fixed_t x, wl_fixed_t y, struct ::wl_data_offer *id) Q_DECL_OVERRIDE;
- void data_device_leave() Q_DECL_OVERRIDE;
- void data_device_motion(uint32_t time, wl_fixed_t x, wl_fixed_t y) Q_DECL_OVERRIDE;
- void data_device_selection(struct ::wl_data_offer *id) Q_DECL_OVERRIDE;
+ void data_device_data_offer(struct ::wl_data_offer *id) override;
+ void data_device_drop() override;
+ void data_device_enter(uint32_t serial, struct ::wl_surface *surface, wl_fixed_t x, wl_fixed_t y, struct ::wl_data_offer *id) override;
+ void data_device_leave() override;
+ void data_device_motion(uint32_t time, wl_fixed_t x, wl_fixed_t y) override;
+ void data_device_selection(struct ::wl_data_offer *id) override;
private Q_SLOTS:
void selectionSourceCancelled();
diff --git a/src/client/qwaylanddataoffer_p.h b/src/client/qwaylanddataoffer_p.h
index 96799c86..c7520f3e 100644
--- a/src/client/qwaylanddataoffer_p.h
+++ b/src/client/qwaylanddataoffer_p.h
@@ -75,7 +75,7 @@ public:
QMimeData *mimeData();
protected:
- void data_offer_offer(const QString &mime_type) Q_DECL_OVERRIDE;
+ void data_offer_offer(const QString &mime_type) override;
private:
QScopedPointer<QWaylandMimeData> m_mimeData;
@@ -90,9 +90,9 @@ public:
void appendFormat(const QString &mimeType);
protected:
- bool hasFormat_sys(const QString &mimeType) const Q_DECL_OVERRIDE;
- QStringList formats_sys() const Q_DECL_OVERRIDE;
- QVariant retrieveData_sys(const QString &mimeType, QVariant::Type type) const Q_DECL_OVERRIDE;
+ bool hasFormat_sys(const QString &mimeType) const override;
+ QStringList formats_sys() const override;
+ QVariant retrieveData_sys(const QString &mimeType, QVariant::Type type) const override;
private:
int readData(int fd, QByteArray &data) const;
diff --git a/src/client/qwaylanddatasource.cpp b/src/client/qwaylanddatasource.cpp
index 036bd0d8..c61de181 100644
--- a/src/client/qwaylanddatasource.cpp
+++ b/src/client/qwaylanddatasource.cpp
@@ -48,6 +48,7 @@
#include <QtCore/QDebug>
#include <unistd.h>
+#include <signal.h>
#if QT_CONFIG(draganddrop)
@@ -85,7 +86,16 @@ void QWaylandDataSource::data_source_send(const QString &mime_type, int32_t fd)
{
QByteArray content = QWaylandMimeHelper::getByteArray(m_mime_data, mime_type);
if (!content.isEmpty()) {
+ // Create a sigpipe handler that does nothing, or clients may be forced to terminate
+ // if the pipe is closed in the other end.
+ struct sigaction action, oldAction;
+ action.sa_handler = SIG_IGN;
+ sigemptyset (&action.sa_mask);
+ action.sa_flags = 0;
+
+ sigaction(SIGPIPE, &action, &oldAction);
write(fd, content.constData(), content.size());
+ sigaction(SIGPIPE, &oldAction, nullptr);
}
close(fd);
}
diff --git a/src/client/qwaylanddatasource_p.h b/src/client/qwaylanddatasource_p.h
index 540e6ad7..0221304c 100644
--- a/src/client/qwaylanddatasource_p.h
+++ b/src/client/qwaylanddatasource_p.h
@@ -81,9 +81,9 @@ Q_SIGNALS:
void cancelled();
protected:
- void data_source_cancelled() Q_DECL_OVERRIDE;
- void data_source_send(const QString &mime_type, int32_t fd) Q_DECL_OVERRIDE;
- void data_source_target(const QString &mime_type) Q_DECL_OVERRIDE;
+ void data_source_cancelled() override;
+ void data_source_send(const QString &mime_type, int32_t fd) override;
+ void data_source_target(const QString &mime_type) override;
private:
QWaylandDisplay *m_display;
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp
index 534373b1..851d715b 100644
--- a/src/client/qwaylanddisplay.cpp
+++ b/src/client/qwaylanddisplay.cpp
@@ -44,7 +44,9 @@
#include "qwaylandscreen_p.h"
#include "qwaylandcursor_p.h"
#include "qwaylandinputdevice_p.h"
+#if QT_CONFIG(clipboard)
#include "qwaylandclipboard_p.h"
+#endif
#include "qwaylanddatadevicemanager_p.h"
#include "qwaylandhardwareintegration_p.h"
#include "qwaylandxdgshell_p.h"
diff --git a/src/client/qwaylanddisplay_p.h b/src/client/qwaylanddisplay_p.h
index a4631b95..e96a8917 100644
--- a/src/client/qwaylanddisplay_p.h
+++ b/src/client/qwaylanddisplay_p.h
@@ -225,8 +225,8 @@ private:
struct wl_callback *mSyncCallback;
static const wl_callback_listener syncCallbackListener;
- void registry_global(uint32_t id, const QString &interface, uint32_t version) Q_DECL_OVERRIDE;
- void registry_global_remove(uint32_t id) Q_DECL_OVERRIDE;
+ void registry_global(uint32_t id, const QString &interface, uint32_t version) override;
+ void registry_global_remove(uint32_t id) override;
static void shellHandleConfigure(void *data, struct wl_shell *shell,
uint32_t time, uint32_t edges,
diff --git a/src/client/qwaylanddnd_p.h b/src/client/qwaylanddnd_p.h
index 215a8b74..2a99432c 100644
--- a/src/client/qwaylanddnd_p.h
+++ b/src/client/qwaylanddnd_p.h
@@ -71,18 +71,18 @@ public:
QWaylandDrag(QWaylandDisplay *display);
~QWaylandDrag();
- QMimeData *platformDropData() Q_DECL_OVERRIDE;
+ QMimeData *platformDropData() override;
void updateTarget(const QString &mimeType);
void setResponse(const QPlatformDragQtResponse &response);
void finishDrag(const QPlatformDropQtResponse &response);
protected:
- void startDrag() Q_DECL_OVERRIDE;
- void cancel() Q_DECL_OVERRIDE;
- void move(const QPoint &globalPos) Q_DECL_OVERRIDE;
- void drop(const QPoint &globalPos) Q_DECL_OVERRIDE;
- void endDrag() Q_DECL_OVERRIDE;
+ void startDrag() override;
+ void cancel() override;
+ void move(const QPoint &globalPos) override;
+ void drop(const QPoint &globalPos) override;
+ void endDrag() override;
private:
diff --git a/src/client/qwaylandextendedsurface_p.h b/src/client/qwaylandextendedsurface_p.h
index 39dc4fcf..02700b29 100644
--- a/src/client/qwaylandextendedsurface_p.h
+++ b/src/client/qwaylandextendedsurface_p.h
@@ -79,9 +79,9 @@ public:
Qt::WindowFlags setWindowFlags(Qt::WindowFlags flags);
private:
- void extended_surface_onscreen_visibility(int32_t visibility) Q_DECL_OVERRIDE;
- void extended_surface_set_generic_property(const QString &name, wl_array *value) Q_DECL_OVERRIDE;
- void extended_surface_close() Q_DECL_OVERRIDE;
+ void extended_surface_onscreen_visibility(int32_t visibility) override;
+ void extended_surface_set_generic_property(const QString &name, wl_array *value) override;
+ void extended_surface_close() override;
QWaylandWindow *m_window;
QVariantMap m_properties;
diff --git a/src/client/qwaylandinputcontext_p.h b/src/client/qwaylandinputcontext_p.h
index 53eab994..a131bc5b 100644
--- a/src/client/qwaylandinputcontext_p.h
+++ b/src/client/qwaylandinputcontext_p.h
@@ -89,20 +89,20 @@ public:
Qt::LayoutDirection inputDirection() const;
protected:
- void zwp_text_input_v2_enter(uint32_t serial, struct ::wl_surface *surface) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_leave(uint32_t serial, struct ::wl_surface *surface) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_modifiers_map(wl_array *map) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_input_panel_state(uint32_t state, int32_t x, int32_t y, int32_t width, int32_t height) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_preedit_string(const QString &text, const QString &commit) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_preedit_styling(uint32_t index, uint32_t length, uint32_t style) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_preedit_cursor(int32_t index) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_commit_string(const QString &text) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_cursor_position(int32_t index, int32_t anchor) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_delete_surrounding_text(uint32_t before_length, uint32_t after_length) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_keysym(uint32_t time, uint32_t sym, uint32_t state, uint32_t modifiers) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_language(const QString &language) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_text_direction(uint32_t direction) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_input_method_changed(uint32_t serial, uint32_t flags) Q_DECL_OVERRIDE;
+ void zwp_text_input_v2_enter(uint32_t serial, struct ::wl_surface *surface) override;
+ void zwp_text_input_v2_leave(uint32_t serial, struct ::wl_surface *surface) override;
+ void zwp_text_input_v2_modifiers_map(wl_array *map) override;
+ void zwp_text_input_v2_input_panel_state(uint32_t state, int32_t x, int32_t y, int32_t width, int32_t height) override;
+ void zwp_text_input_v2_preedit_string(const QString &text, const QString &commit) override;
+ void zwp_text_input_v2_preedit_styling(uint32_t index, uint32_t length, uint32_t style) override;
+ void zwp_text_input_v2_preedit_cursor(int32_t index) override;
+ void zwp_text_input_v2_commit_string(const QString &text) override;
+ void zwp_text_input_v2_cursor_position(int32_t index, int32_t anchor) override;
+ void zwp_text_input_v2_delete_surrounding_text(uint32_t before_length, uint32_t after_length) override;
+ void zwp_text_input_v2_keysym(uint32_t time, uint32_t sym, uint32_t state, uint32_t modifiers) override;
+ void zwp_text_input_v2_language(const QString &language) override;
+ void zwp_text_input_v2_text_direction(uint32_t direction) override;
+ void zwp_text_input_v2_input_method_changed(uint32_t serial, uint32_t flags) override;
private:
Qt::KeyboardModifiers modifiersToQtModifiers(uint32_t modifiers);
@@ -134,23 +134,23 @@ public:
explicit QWaylandInputContext(QWaylandDisplay *display);
~QWaylandInputContext();
- bool isValid() const Q_DECL_OVERRIDE;
+ bool isValid() const override;
- void reset() Q_DECL_OVERRIDE;
- void commit() Q_DECL_OVERRIDE;
- void update(Qt::InputMethodQueries) Q_DECL_OVERRIDE;
+ void reset() override;
+ void commit() override;
+ void update(Qt::InputMethodQueries) override;
- void invokeAction(QInputMethod::Action, int cursorPosition) Q_DECL_OVERRIDE;
+ void invokeAction(QInputMethod::Action, int cursorPosition) override;
- void showInputPanel() Q_DECL_OVERRIDE;
- void hideInputPanel() Q_DECL_OVERRIDE;
- bool isInputPanelVisible() const Q_DECL_OVERRIDE;
- QRectF keyboardRect() const Q_DECL_OVERRIDE;
+ void showInputPanel() override;
+ void hideInputPanel() override;
+ bool isInputPanelVisible() const override;
+ QRectF keyboardRect() const override;
- QLocale locale() const Q_DECL_OVERRIDE;
- Qt::LayoutDirection inputDirection() const Q_DECL_OVERRIDE;
+ QLocale locale() const override;
+ Qt::LayoutDirection inputDirection() const override;
- void setFocusObject(QObject *object) Q_DECL_OVERRIDE;
+ void setFocusObject(QObject *object) override;
private:
QWaylandTextInput *textInput() const;
diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp
index 4e8ef7b6..fb22c95e 100644
--- a/src/client/qwaylandinputdevice.cpp
+++ b/src/client/qwaylandinputdevice.cpp
@@ -62,7 +62,9 @@
#include <fcntl.h>
#include <sys/mman.h>
+#if QT_CONFIG(cursor)
#include <wayland-cursor.h>
+#endif
#include <QtGui/QGuiApplication>
@@ -145,10 +147,14 @@ QWaylandInputDevice::Pointer::Pointer(QWaylandInputDevice *p)
: mParent(p)
, mFocus(0)
, mEnterSerial(0)
+#if QT_CONFIG(cursor)
, mCursorSerial(0)
+#endif
, mButtons(0)
+#if QT_CONFIG(cursor)
, mCursorBuffer(nullptr)
, mCursorShape(Qt::BitmapCursor)
+#endif
{
}
@@ -344,6 +350,7 @@ Qt::KeyboardModifiers QWaylandInputDevice::Keyboard::modifiers() const
return ret;
}
+#if QT_CONFIG(cursor)
uint32_t QWaylandInputDevice::cursorSerial() const
{
if (mPointer)
@@ -415,6 +422,7 @@ void QWaylandInputDevice::setCursor(const QSharedPointer<QWaylandBuffer> &buffer
setCursor(buffer->buffer(), hotSpot, buffer->size());
mPixmapCursor = buffer;
}
+#endif
class EnterEvent : public QWaylandPointerEvent
{
@@ -431,7 +439,9 @@ void QWaylandInputDevice::Pointer::pointer_enter(uint32_t serial, struct wl_surf
return;
QWaylandWindow *window = QWaylandWindow::fromWlSurface(surface);
+#if QT_CONFIG(cursor)
window->window()->setCursor(window->window()->cursor());
+#endif
mFocus = window;
mSurfacePos = QPointF(wl_fixed_to_double(sx), wl_fixed_to_double(sy));
diff --git a/src/client/qwaylandinputdevice_p.h b/src/client/qwaylandinputdevice_p.h
index 6d458e35..d8bd0062 100644
--- a/src/client/qwaylandinputdevice_p.h
+++ b/src/client/qwaylandinputdevice_p.h
@@ -72,7 +72,9 @@
#include <QtCore/QDebug>
+#if QT_CONFIG(cursor)
struct wl_cursor_image;
+#endif
QT_BEGIN_NAMESPACE
@@ -100,10 +102,12 @@ public:
struct ::wl_seat *wl_seat() { return QtWayland::wl_seat::object(); }
+#if QT_CONFIG(cursor)
void setCursor(const QCursor &cursor, QWaylandScreen *screen);
void setCursor(struct wl_buffer *buffer, struct ::wl_cursor_image *image);
void setCursor(struct wl_buffer *buffer, const QPoint &hotSpot, const QSize &size);
void setCursor(const QSharedPointer<QWaylandBuffer> &buffer, const QPoint &hotSpot);
+#endif
void handleWindowDestroyed(QWaylandWindow *window);
void handleEndDrag();
@@ -150,7 +154,7 @@ private:
uint32_t mTime;
uint32_t mSerial;
- void seat_capabilities(uint32_t caps) Q_DECL_OVERRIDE;
+ void seat_capabilities(uint32_t caps) override;
void handleTouchPoint(int id, double x, double y, Qt::TouchPointState state);
QTouchDevice *mTouchDevice;
@@ -179,19 +183,19 @@ public:
void keyboard_keymap(uint32_t format,
int32_t fd,
- uint32_t size) Q_DECL_OVERRIDE;
+ uint32_t size) override;
void keyboard_enter(uint32_t time,
struct wl_surface *surface,
- struct wl_array *keys) Q_DECL_OVERRIDE;
+ struct wl_array *keys) override;
void keyboard_leave(uint32_t time,
- struct wl_surface *surface) Q_DECL_OVERRIDE;
+ struct wl_surface *surface) override;
void keyboard_key(uint32_t serial, uint32_t time,
- uint32_t key, uint32_t state) Q_DECL_OVERRIDE;
+ uint32_t key, uint32_t state) override;
void keyboard_modifiers(uint32_t serial,
uint32_t mods_depressed,
uint32_t mods_latched,
uint32_t mods_locked,
- uint32_t group) Q_DECL_OVERRIDE;
+ uint32_t group) override;
QWaylandInputDevice *mParent;
QWaylandWindow *mFocus;
@@ -232,27 +236,31 @@ public:
virtual ~Pointer();
void pointer_enter(uint32_t serial, struct wl_surface *surface,
- wl_fixed_t sx, wl_fixed_t sy) Q_DECL_OVERRIDE;
- void pointer_leave(uint32_t time, struct wl_surface *surface) Q_DECL_OVERRIDE;
+ wl_fixed_t sx, wl_fixed_t sy) override;
+ void pointer_leave(uint32_t time, struct wl_surface *surface) override;
void pointer_motion(uint32_t time,
- wl_fixed_t sx, wl_fixed_t sy) Q_DECL_OVERRIDE;
+ wl_fixed_t sx, wl_fixed_t sy) override;
void pointer_button(uint32_t serial, uint32_t time,
- uint32_t button, uint32_t state) Q_DECL_OVERRIDE;
+ uint32_t button, uint32_t state) override;
void pointer_axis(uint32_t time,
uint32_t axis,
- wl_fixed_t value) Q_DECL_OVERRIDE;
+ wl_fixed_t value) override;
void releaseButtons();
QWaylandInputDevice *mParent;
QWaylandWindow *mFocus;
uint32_t mEnterSerial;
+#if QT_CONFIG(cursor)
uint32_t mCursorSerial;
+#endif
QPointF mSurfacePos;
QPointF mGlobalPos;
Qt::MouseButtons mButtons;
+#if QT_CONFIG(cursor)
wl_buffer *mCursorBuffer;
Qt::CursorShape mCursorShape;
+#endif
};
class Q_WAYLAND_CLIENT_EXPORT QWaylandInputDevice::Touch : public QtWayland::wl_touch
@@ -266,16 +274,16 @@ public:
struct wl_surface *surface,
int32_t id,
wl_fixed_t x,
- wl_fixed_t y) Q_DECL_OVERRIDE;
+ wl_fixed_t y) override;
void touch_up(uint32_t serial,
uint32_t time,
- int32_t id) Q_DECL_OVERRIDE;
+ int32_t id) override;
void touch_motion(uint32_t time,
int32_t id,
wl_fixed_t x,
- wl_fixed_t y) Q_DECL_OVERRIDE;
- void touch_frame() Q_DECL_OVERRIDE;
- void touch_cancel() Q_DECL_OVERRIDE;
+ wl_fixed_t y) override;
+ void touch_frame() override;
+ void touch_cancel() override;
bool allTouchPointsReleased();
void releasePoints();
diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp
index 8bd9f490..400f3517 100644
--- a/src/client/qwaylandintegration.cpp
+++ b/src/client/qwaylandintegration.cpp
@@ -45,7 +45,9 @@
#include "qwaylandinputcontext_p.h"
#include "qwaylandshmbackingstore_p.h"
#include "qwaylandnativeinterface_p.h"
+#if QT_CONFIG(clipboard)
#include "qwaylandclipboard_p.h"
+#endif
#include "qwaylanddnd_p.h"
#include "qwaylandwindowmanagerintegration_p.h"
#include "qwaylandscreen_p.h"
@@ -132,8 +134,10 @@ QWaylandIntegration::QWaylandIntegration()
{
initializeInputDeviceIntegration();
mDisplay.reset(new QWaylandDisplay(this));
-#if QT_CONFIG(draganddrop)
+#if QT_CONFIG(clipboard)
mClipboard.reset(new QWaylandClipboard(mDisplay.data()));
+#endif
+#if QT_CONFIG(draganddrop)
mDrag.reset(new QWaylandDrag(mDisplay.data()));
#endif
QString icStr = QPlatformInputContextFactory::requested();
@@ -229,12 +233,14 @@ QPlatformFontDatabase *QWaylandIntegration::fontDatabase() const
return mFontDb.data();
}
-#if QT_CONFIG(draganddrop)
+#if QT_CONFIG(clipboard)
QPlatformClipboard *QWaylandIntegration::clipboard() const
{
return mClipboard.data();
}
+#endif
+#if QT_CONFIG(draganddrop)
QPlatformDrag *QWaylandIntegration::drag() const
{
return mDrag.data();
diff --git a/src/client/qwaylandintegration_p.h b/src/client/qwaylandintegration_p.h
index 1689581a..174eca25 100644
--- a/src/client/qwaylandintegration_p.h
+++ b/src/client/qwaylandintegration_p.h
@@ -73,38 +73,40 @@ public:
QWaylandIntegration();
~QWaylandIntegration();
- bool hasCapability(QPlatformIntegration::Capability cap) const Q_DECL_OVERRIDE;
- QPlatformWindow *createPlatformWindow(QWindow *window) const Q_DECL_OVERRIDE;
+ bool hasCapability(QPlatformIntegration::Capability cap) const override;
+ QPlatformWindow *createPlatformWindow(QWindow *window) const override;
#if QT_CONFIG(opengl)
- QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const Q_DECL_OVERRIDE;
+ QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const override;
#endif
- QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const Q_DECL_OVERRIDE;
+ QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const override;
- QAbstractEventDispatcher *createEventDispatcher() const Q_DECL_OVERRIDE;
- void initialize() Q_DECL_OVERRIDE;
+ QAbstractEventDispatcher *createEventDispatcher() const override;
+ void initialize() override;
- QPlatformFontDatabase *fontDatabase() const Q_DECL_OVERRIDE;
+ QPlatformFontDatabase *fontDatabase() const override;
- QPlatformNativeInterface *nativeInterface() const Q_DECL_OVERRIDE;
+ QPlatformNativeInterface *nativeInterface() const override;
+#if QT_CONFIG(clipboard)
+ QPlatformClipboard *clipboard() const override;
+#endif
#if QT_CONFIG(draganddrop)
- QPlatformClipboard *clipboard() const Q_DECL_OVERRIDE;
- QPlatformDrag *drag() const Q_DECL_OVERRIDE;
+ QPlatformDrag *drag() const override;
#endif
- QPlatformInputContext *inputContext() const Q_DECL_OVERRIDE;
+ QPlatformInputContext *inputContext() const override;
- QVariant styleHint(StyleHint hint) const Q_DECL_OVERRIDE;
+ QVariant styleHint(StyleHint hint) const override;
#if QT_CONFIG(accessibility)
- QPlatformAccessibility *accessibility() const Q_DECL_OVERRIDE;
+ QPlatformAccessibility *accessibility() const override;
#endif
- QPlatformServices *services() const Q_DECL_OVERRIDE;
+ QPlatformServices *services() const override;
QWaylandDisplay *display() const;
- QStringList themeNames() const Q_DECL_OVERRIDE;
+ QStringList themeNames() const override;
- QPlatformTheme *createPlatformTheme(const QString &name) const Q_DECL_OVERRIDE;
+ QPlatformTheme *createPlatformTheme(const QString &name) const override;
QWaylandInputDevice *createInputDevice(QWaylandDisplay *display, int version, uint32_t id);
@@ -131,8 +133,10 @@ private:
QWaylandShellIntegration *createShellIntegration(const QString& interfaceName);
QScopedPointer<QPlatformFontDatabase> mFontDb;
-#if QT_CONFIG(draganddrop)
+#if QT_CONFIG(clipboard)
QScopedPointer<QPlatformClipboard> mClipboard;
+#endif
+#if QT_CONFIG(draganddrop)
QScopedPointer<QPlatformDrag> mDrag;
#endif
QScopedPointer<QPlatformNativeInterface> mNativeInterface;
diff --git a/src/client/qwaylandnativeinterface_p.h b/src/client/qwaylandnativeinterface_p.h
index 7b8b2834..c83180c0 100644
--- a/src/client/qwaylandnativeinterface_p.h
+++ b/src/client/qwaylandnativeinterface_p.h
@@ -67,22 +67,22 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandNativeInterface : public QPlatformNativeIn
{
public:
QWaylandNativeInterface(QWaylandIntegration *integration);
- void *nativeResourceForIntegration(const QByteArray &resource) Q_DECL_OVERRIDE;
+ void *nativeResourceForIntegration(const QByteArray &resource) override;
void *nativeResourceForWindow(const QByteArray &resourceString,
- QWindow *window) Q_DECL_OVERRIDE;
+ QWindow *window) override;
void *nativeResourceForScreen(const QByteArray &resourceString,
- QScreen *screen) Q_DECL_OVERRIDE;
+ QScreen *screen) override;
#if QT_CONFIG(opengl)
- void *nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context) Q_DECL_OVERRIDE;
+ void *nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context) override;
#endif
- QVariantMap windowProperties(QPlatformWindow *window) const Q_DECL_OVERRIDE;
- QVariant windowProperty(QPlatformWindow *window, const QString &name) const Q_DECL_OVERRIDE;
- QVariant windowProperty(QPlatformWindow *window, const QString &name, const QVariant &defaultValue) const Q_DECL_OVERRIDE;
- void setWindowProperty(QPlatformWindow *window, const QString &name, const QVariant &value) Q_DECL_OVERRIDE;
+ QVariantMap windowProperties(QPlatformWindow *window) const override;
+ QVariant windowProperty(QPlatformWindow *window, const QString &name) const override;
+ QVariant windowProperty(QPlatformWindow *window, const QString &name, const QVariant &defaultValue) const override;
+ void setWindowProperty(QPlatformWindow *window, const QString &name, const QVariant &value) override;
void emitWindowPropertyChanged(QPlatformWindow *window, const QString &name);
- QFunctionPointer platformFunction(const QByteArray &resource) const Q_DECL_OVERRIDE;
+ QFunctionPointer platformFunction(const QByteArray &resource) const override;
private:
QWaylandIntegration *m_integration;
diff --git a/src/client/qwaylandqtkey_p.h b/src/client/qwaylandqtkey_p.h
index 155b6254..3374b907 100644
--- a/src/client/qwaylandqtkey_p.h
+++ b/src/client/qwaylandqtkey_p.h
@@ -80,7 +80,7 @@ private:
uint32_t nativeModifiers,
const QString &text,
uint32_t autorep,
- uint32_t count) Q_DECL_OVERRIDE;
+ uint32_t count) override;
};
diff --git a/src/client/qwaylandscreen.cpp b/src/client/qwaylandscreen.cpp
index 5dbfe5e9..31d21a1c 100644
--- a/src/client/qwaylandscreen.cpp
+++ b/src/client/qwaylandscreen.cpp
@@ -64,18 +64,24 @@ QWaylandScreen::QWaylandScreen(QWaylandDisplay *waylandDisplay, int version, uin
, mFormat(QImage::Format_ARGB32_Premultiplied)
, mOutputName(QStringLiteral("Screen%1").arg(id))
, m_orientation(Qt::PrimaryOrientation)
+#if QT_CONFIG(cursor)
, mWaylandCursor(0)
+#endif
{
}
QWaylandScreen::~QWaylandScreen()
{
+#if QT_CONFIG(cursor)
delete mWaylandCursor;
+#endif
}
void QWaylandScreen::init()
{
+#if QT_CONFIG(cursor)
mWaylandCursor = new QWaylandCursor(this);
+#endif
}
QWaylandDisplay * QWaylandScreen::display() const
@@ -156,10 +162,12 @@ qreal QWaylandScreen::refreshRate() const
return mRefreshRate / 1000.f;
}
+#if QT_CONFIG(cursor)
QPlatformCursor *QWaylandScreen::cursor() const
{
return mWaylandCursor;
}
+#endif
QWaylandScreen * QWaylandScreen::waylandScreenFromWindow(QWindow *window)
{
diff --git a/src/client/qwaylandscreen_p.h b/src/client/qwaylandscreen_p.h
index 9c1f4673..b2900a96 100644
--- a/src/client/qwaylandscreen_p.h
+++ b/src/client/qwaylandscreen_p.h
@@ -72,26 +72,28 @@ public:
void init();
QWaylandDisplay *display() const;
- QRect geometry() const Q_DECL_OVERRIDE;
- int depth() const Q_DECL_OVERRIDE;
- QImage::Format format() const Q_DECL_OVERRIDE;
+ QRect geometry() const override;
+ int depth() const override;
+ QImage::Format format() const override;
- QSizeF physicalSize() const Q_DECL_OVERRIDE;
+ QSizeF physicalSize() const override;
- QDpi logicalDpi() const Q_DECL_OVERRIDE;
- QList<QPlatformScreen *> virtualSiblings() const Q_DECL_OVERRIDE;
+ QDpi logicalDpi() const override;
+ QList<QPlatformScreen *> virtualSiblings() const override;
- void setOrientationUpdateMask(Qt::ScreenOrientations mask) Q_DECL_OVERRIDE;
+ void setOrientationUpdateMask(Qt::ScreenOrientations mask) override;
- Qt::ScreenOrientation orientation() const Q_DECL_OVERRIDE;
+ Qt::ScreenOrientation orientation() const override;
int scale() const;
- qreal devicePixelRatio() const Q_DECL_OVERRIDE;
- qreal refreshRate() const Q_DECL_OVERRIDE;
+ qreal devicePixelRatio() const override;
+ qreal refreshRate() const override;
- QString name() const Q_DECL_OVERRIDE { return mOutputName; }
+ QString name() const override { return mOutputName; }
- QPlatformCursor *cursor() const Q_DECL_OVERRIDE;
+#if QT_CONFIG(cursor)
+ QPlatformCursor *cursor() const override;
QWaylandCursor *waylandCursor() const { return mWaylandCursor; };
+#endif
uint32_t outputId() const { return m_outputId; }
::wl_output *output() { return object(); }
@@ -99,15 +101,15 @@ public:
static QWaylandScreen *waylandScreenFromWindow(QWindow *window);
private:
- void output_mode(uint32_t flags, int width, int height, int refresh) Q_DECL_OVERRIDE;
+ void output_mode(uint32_t flags, int width, int height, int refresh) override;
void output_geometry(int32_t x, int32_t y,
int32_t width, int32_t height,
int subpixel,
const QString &make,
const QString &model,
- int32_t transform) Q_DECL_OVERRIDE;
- void output_scale(int32_t factor) Q_DECL_OVERRIDE;
- void output_done() Q_DECL_OVERRIDE;
+ int32_t transform) override;
+ void output_scale(int32_t factor) override;
+ void output_done() override;
int m_outputId;
QWaylandDisplay *mWaylandDisplay;
@@ -121,7 +123,9 @@ private:
QString mOutputName;
Qt::ScreenOrientation m_orientation;
+#if QT_CONFIG(cursor)
QWaylandCursor *mWaylandCursor;
+#endif
};
}
diff --git a/src/client/qwaylandshmbackingstore_p.h b/src/client/qwaylandshmbackingstore_p.h
index a5b809c7..71f98e30 100644
--- a/src/client/qwaylandshmbackingstore_p.h
+++ b/src/client/qwaylandshmbackingstore_p.h
@@ -72,8 +72,8 @@ public:
QWaylandShmBuffer(QWaylandDisplay *display,
const QSize &size, QImage::Format format, int scale = 1);
~QWaylandShmBuffer();
- QSize size() const Q_DECL_OVERRIDE { return mImage.size(); }
- int scale() const Q_DECL_OVERRIDE { return int(mImage.devicePixelRatio()); }
+ QSize size() const override { return mImage.size(); }
+ int scale() const override { return int(mImage.devicePixelRatio()); }
QImage *image() { return &mImage; }
QImage *imageInsideMargins(const QMargins &margins);
@@ -91,11 +91,11 @@ public:
~QWaylandShmBackingStore();
QPaintDevice *paintDevice();
- void flush(QWindow *window, const QRegion &region, const QPoint &offset) Q_DECL_OVERRIDE;
- void resize(const QSize &size, const QRegion &staticContents) Q_DECL_OVERRIDE;
+ void flush(QWindow *window, const QRegion &region, const QPoint &offset) override;
+ void resize(const QSize &size, const QRegion &staticContents) override;
void resize(const QSize &size);
- void beginPaint(const QRegion &) Q_DECL_OVERRIDE;
- void endPaint() Q_DECL_OVERRIDE;
+ void beginPaint(const QRegion &) override;
+ void endPaint() override;
QWaylandAbstractDecoration *windowDecoration() const;
@@ -108,7 +108,7 @@ public:
void iterateBuffer();
#if QT_CONFIG(opengl)
- QImage toImage() const Q_DECL_OVERRIDE;
+ QImage toImage() const override;
#endif
private:
diff --git a/src/client/qwaylandshmwindow_p.h b/src/client/qwaylandshmwindow_p.h
index d06b9b00..af86ce3a 100644
--- a/src/client/qwaylandshmwindow_p.h
+++ b/src/client/qwaylandshmwindow_p.h
@@ -64,8 +64,8 @@ public:
QWaylandShmWindow(QWindow *window);
~QWaylandShmWindow();
- WindowType windowType() const Q_DECL_OVERRIDE;
- QSurfaceFormat format() const Q_DECL_OVERRIDE { return QSurfaceFormat(); }
+ WindowType windowType() const override;
+ QSurfaceFormat format() const override { return QSurfaceFormat(); }
};
}
diff --git a/src/client/qwaylandtouch_p.h b/src/client/qwaylandtouch_p.h
index b17bce6a..7d909769 100644
--- a/src/client/qwaylandtouch_p.h
+++ b/src/client/qwaylandtouch_p.h
@@ -88,8 +88,8 @@ private:
int32_t velocity_x,
int32_t velocity_y,
uint32_t flags,
- struct wl_array *rawdata) Q_DECL_OVERRIDE;
- void touch_extension_configure(uint32_t flags) Q_DECL_OVERRIDE;
+ struct wl_array *rawdata) override;
+ void touch_extension_configure(uint32_t flags) override;
void sendTouchEvent();
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index 13a78d25..75c5b2f9 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -176,6 +176,9 @@ void QWaylandWindow::initWindow()
mShellSurface->setAppId(appId);
}
}
+ // the user may have already set some window properties, so make sure to send them out
+ for (auto it = m_properties.cbegin(); it != m_properties.cend(); ++it)
+ mShellSurface->sendProperty(it.key(), it.value());
}
// Enable high-dpi rendering. Scale() returns the screen scale factor and will
@@ -713,8 +716,10 @@ void QWaylandWindow::handleMouse(QWaylandInputDevice *inputDevice, const QWaylan
}
}
+#if QT_CONFIG(cursor)
if (e.type == QWaylandPointerEvent::Enter)
restoreMouseCursor(inputDevice);
+#endif
}
void QWaylandWindow::handleMouseLeave(QWaylandInputDevice *inputDevice)
@@ -726,7 +731,9 @@ void QWaylandWindow::handleMouseLeave(QWaylandInputDevice *inputDevice)
} else {
QWindowSystemInterface::handleLeaveEvent(window());
}
+#if QT_CONFIG(cursor)
restoreMouseCursor(inputDevice);
+#endif
}
bool QWaylandWindow::touchDragDecoration(QWaylandInputDevice *inputDevice, const QPointF &local, const QPointF &global, Qt::TouchPointState state, Qt::KeyboardModifiers mods)
@@ -758,7 +765,9 @@ void QWaylandWindow::handleMouseEventWithDecoration(QWaylandInputDevice *inputDe
globalTranslated.setX(globalTranslated.x() - marg.left());
globalTranslated.setY(globalTranslated.y() - marg.top());
if (!mMouseEventsInContentArea) {
+#if QT_CONFIG(cursor)
restoreMouseCursor(inputDevice);
+#endif
QWindowSystemInterface::handleEnterEvent(window());
}
@@ -784,6 +793,7 @@ void QWaylandWindow::handleMouseEventWithDecoration(QWaylandInputDevice *inputDe
}
}
+#if QT_CONFIG(cursor)
void QWaylandWindow::setMouseCursor(QWaylandInputDevice *device, const QCursor &cursor)
{
device->setCursor(cursor, mScreen);
@@ -793,6 +803,7 @@ void QWaylandWindow::restoreMouseCursor(QWaylandInputDevice *device)
{
setMouseCursor(device, window()->cursor());
}
+#endif
void QWaylandWindow::requestActivateWindow()
{
diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h
index 3ca8f42c..e67cf0af 100644
--- a/src/client/qwaylandwindow_p.h
+++ b/src/client/qwaylandwindow_p.h
@@ -111,16 +111,16 @@ public:
~QWaylandWindow();
virtual WindowType windowType() const = 0;
- WId winId() const Q_DECL_OVERRIDE;
- void setVisible(bool visible) Q_DECL_OVERRIDE;
- void setParent(const QPlatformWindow *parent) Q_DECL_OVERRIDE;
+ WId winId() const override;
+ void setVisible(bool visible) override;
+ void setParent(const QPlatformWindow *parent) override;
- void setWindowTitle(const QString &title) Q_DECL_OVERRIDE;
+ void setWindowTitle(const QString &title) override;
inline QIcon windowIcon() const;
- void setWindowIcon(const QIcon &icon) Q_DECL_OVERRIDE;
+ void setWindowIcon(const QIcon &icon) override;
- void setGeometry(const QRect &rect) Q_DECL_OVERRIDE;
+ void setGeometry(const QRect &rect) override;
void configure(uint32_t edges, int32_t width, int32_t height);
@@ -136,7 +136,7 @@ public:
void waitForFrameSync();
- QMargins frameMargins() const Q_DECL_OVERRIDE;
+ QMargins frameMargins() const override;
static QWaylandWindow *fromWlSurface(::wl_surface *surface);
@@ -145,22 +145,22 @@ public:
QWaylandSubSurface *subSurfaceWindow() const;
QWaylandScreen *screen() const { return mScreen; }
- void handleContentOrientationChange(Qt::ScreenOrientation orientation) Q_DECL_OVERRIDE;
+ void handleContentOrientationChange(Qt::ScreenOrientation orientation) override;
void setOrientationMask(Qt::ScreenOrientations mask);
- void setWindowState(Qt::WindowState state) Q_DECL_OVERRIDE;
- void setWindowFlags(Qt::WindowFlags flags) Q_DECL_OVERRIDE;
+ void setWindowState(Qt::WindowState state) override;
+ void setWindowFlags(Qt::WindowFlags flags) override;
- void raise() Q_DECL_OVERRIDE;
- void lower() Q_DECL_OVERRIDE;
+ void raise() override;
+ void lower() override;
- void setMask(const QRegion &region) Q_DECL_OVERRIDE;
+ void setMask(const QRegion &region) override;
int scale() const;
- qreal devicePixelRatio() const Q_DECL_OVERRIDE;
+ qreal devicePixelRatio() const override;
- void requestActivateWindow() Q_DECL_OVERRIDE;
- bool isExposed() const Q_DECL_OVERRIDE;
+ void requestActivateWindow() override;
+ bool isExposed() const override;
void unfocus();
QWaylandAbstractDecoration *decoration() const;
@@ -176,8 +176,10 @@ public:
inline bool isMaximized() const { return mState == Qt::WindowMaximized; }
inline bool isFullscreen() const { return mState == Qt::WindowFullScreen; }
+#if QT_CONFIG(cursor)
void setMouseCursor(QWaylandInputDevice *device, const QCursor &cursor);
void restoreMouseCursor(QWaylandInputDevice *device);
+#endif
QWaylandWindow *transientParent() const;
@@ -185,7 +187,7 @@ public:
void doResize();
void setCanResize(bool canResize);
- bool setMouseGrabEnabled(bool grab) Q_DECL_OVERRIDE;
+ bool setMouseGrabEnabled(bool grab) override;
static QWaylandWindow *mouseGrab() { return mMouseGrab; }
void sendProperty(const QString &name, const QVariant &value);
@@ -198,11 +200,11 @@ public:
void setBackingStore(QWaylandShmBackingStore *backingStore) { mBackingStore = backingStore; }
QWaylandShmBackingStore *backingStore() const { return mBackingStore; }
- bool setKeyboardGrabEnabled(bool) Q_DECL_OVERRIDE { return false; }
- void propagateSizeHints() Q_DECL_OVERRIDE { }
+ bool setKeyboardGrabEnabled(bool) override { return false; }
+ void propagateSizeHints() override { }
void addAttachOffset(const QPoint point);
- void requestUpdate() Q_DECL_OVERRIDE;
+ void requestUpdate() override;
public slots:
void requestResize();
diff --git a/src/client/qwaylandwindowmanagerintegration_p.h b/src/client/qwaylandwindowmanagerintegration_p.h
index 463b67ef..cf6ca660 100644
--- a/src/client/qwaylandwindowmanagerintegration_p.h
+++ b/src/client/qwaylandwindowmanagerintegration_p.h
@@ -77,10 +77,10 @@ public:
explicit QWaylandWindowManagerIntegration(QWaylandDisplay *waylandDisplay);
virtual ~QWaylandWindowManagerIntegration();
- QByteArray desktopEnvironment() const Q_DECL_OVERRIDE;
+ QByteArray desktopEnvironment() const override;
- bool openUrl(const QUrl &url) Q_DECL_OVERRIDE;
- bool openDocument(const QUrl &url) Q_DECL_OVERRIDE;
+ bool openUrl(const QUrl &url) override;
+ bool openDocument(const QUrl &url) override;
bool showIsFullScreen() const;
@@ -90,8 +90,8 @@ private:
QScopedPointer<QWaylandWindowManagerIntegrationPrivate> d_ptr;
- void windowmanager_hints(int32_t showIsFullScreen) Q_DECL_OVERRIDE;
- void windowmanager_quit() Q_DECL_OVERRIDE;
+ void windowmanager_hints(int32_t showIsFullScreen) override;
+ void windowmanager_quit() override;
void openUrl_helper(const QUrl &url);
};
diff --git a/src/client/qwaylandwlshellintegration_p.h b/src/client/qwaylandwlshellintegration_p.h
index 393ccaf0..8a33a177 100644
--- a/src/client/qwaylandwlshellintegration_p.h
+++ b/src/client/qwaylandwlshellintegration_p.h
@@ -58,8 +58,8 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandWlShellIntegration : public QWaylandShellI
{
public:
static QWaylandWlShellIntegration *create(QWaylandDisplay* display);
- bool initialize(QWaylandDisplay *) Q_DECL_OVERRIDE;
- QWaylandShellSurface *createShellSurface(QWaylandWindow *window) Q_DECL_OVERRIDE;
+ bool initialize(QWaylandDisplay *) override;
+ QWaylandShellSurface *createShellSurface(QWaylandWindow *window) override;
private:
QWaylandWlShellIntegration(QWaylandDisplay* display);
diff --git a/src/client/qwaylandwlshellsurface_p.h b/src/client/qwaylandwlshellsurface_p.h
index 89bce558..94e3417a 100644
--- a/src/client/qwaylandwlshellsurface_p.h
+++ b/src/client/qwaylandwlshellsurface_p.h
@@ -78,27 +78,27 @@ public:
virtual ~QWaylandWlShellSurface();
using QtWayland::wl_shell_surface::resize;
- void resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges) Q_DECL_OVERRIDE;
+ void resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges) override;
using QtWayland::wl_shell_surface::move;
- void move(QWaylandInputDevice *inputDevice) Q_DECL_OVERRIDE;
+ void move(QWaylandInputDevice *inputDevice) override;
- void setTitle(const QString & title) Q_DECL_OVERRIDE;
- void setAppId(const QString &appId) Q_DECL_OVERRIDE;
+ void setTitle(const QString & title) override;
+ void setAppId(const QString &appId) override;
- void raise() Q_DECL_OVERRIDE;
- void lower() Q_DECL_OVERRIDE;
- void setContentOrientationMask(Qt::ScreenOrientations orientation) Q_DECL_OVERRIDE;
- void setWindowFlags(Qt::WindowFlags flags) Q_DECL_OVERRIDE;
- void sendProperty(const QString &name, const QVariant &value) Q_DECL_OVERRIDE;
+ void raise() override;
+ void lower() override;
+ void setContentOrientationMask(Qt::ScreenOrientations orientation) override;
+ void setWindowFlags(Qt::WindowFlags flags) override;
+ void sendProperty(const QString &name, const QVariant &value) override;
void setType(Qt::WindowType type, QWaylandWindow *transientParent) override;
private:
- void setMaximized() Q_DECL_OVERRIDE;
- void setFullscreen() Q_DECL_OVERRIDE;
- void setNormal() Q_DECL_OVERRIDE;
- void setMinimized() Q_DECL_OVERRIDE;
+ void setMaximized() override;
+ void setFullscreen() override;
+ void setNormal() override;
+ void setMinimized() override;
void setTopLevel();
void updateTransientParent(QWindow *parent);
@@ -110,11 +110,11 @@ private:
QSize m_size;
QWaylandExtendedSurface *m_extendedWindow;
- void shell_surface_ping(uint32_t serial) Q_DECL_OVERRIDE;
+ void shell_surface_ping(uint32_t serial) override;
void shell_surface_configure(uint32_t edges,
int32_t width,
- int32_t height) Q_DECL_OVERRIDE;
- void shell_surface_popup_done() Q_DECL_OVERRIDE;
+ int32_t height) override;
+ void shell_surface_popup_done() override;
friend class QWaylandWindow;
};
diff --git a/src/client/qwaylandxdgshell_p.h b/src/client/qwaylandxdgshell_p.h
index 97a15e46..f462f282 100644
--- a/src/client/qwaylandxdgshell_p.h
+++ b/src/client/qwaylandxdgshell_p.h
@@ -82,7 +82,7 @@ public:
QWaylandXdgPopup *createXdgPopup(QWaylandWindow *window);
private:
- void xdg_shell_ping(uint32_t serial) Q_DECL_OVERRIDE;
+ void xdg_shell_ping(uint32_t serial) override;
QVector<QWaylandWindow *> m_popups;
uint m_popupSerial;
diff --git a/src/client/qwaylandxdgshellintegration_p.h b/src/client/qwaylandxdgshellintegration_p.h
index 0658e52b..adf2bca2 100644
--- a/src/client/qwaylandxdgshellintegration_p.h
+++ b/src/client/qwaylandxdgshellintegration_p.h
@@ -59,9 +59,9 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandXdgShellIntegration : public QWaylandShell
{
public:
static QWaylandXdgShellIntegration *create(QWaylandDisplay* display);
- bool initialize(QWaylandDisplay *display) Q_DECL_OVERRIDE;
- QWaylandShellSurface *createShellSurface(QWaylandWindow *window) Q_DECL_OVERRIDE;
- void handleKeyboardFocusChanged(QWaylandWindow *newFocus, QWaylandWindow *oldFocus) Q_DECL_OVERRIDE;
+ bool initialize(QWaylandDisplay *display) override;
+ QWaylandShellSurface *createShellSurface(QWaylandWindow *window) override;
+ void handleKeyboardFocusChanged(QWaylandWindow *newFocus, QWaylandWindow *oldFocus) override;
private:
QWaylandXdgShellIntegration(QWaylandDisplay *display);
diff --git a/src/client/qwaylandxdgsurface_p.h b/src/client/qwaylandxdgsurface_p.h
index 184ef13e..00154ade 100644
--- a/src/client/qwaylandxdgsurface_p.h
+++ b/src/client/qwaylandxdgsurface_p.h
@@ -82,19 +82,19 @@ public:
using QtWayland::xdg_surface::resize;
void resize(QWaylandInputDevice *inputDevice, enum resize_edge edges);
- void resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges) Q_DECL_OVERRIDE;
+ void resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges) override;
using QtWayland::xdg_surface::move;
- void move(QWaylandInputDevice *inputDevice) Q_DECL_OVERRIDE;
+ void move(QWaylandInputDevice *inputDevice) override;
- void setTitle(const QString &title) Q_DECL_OVERRIDE;
- void setAppId(const QString &appId) Q_DECL_OVERRIDE;
+ void setTitle(const QString &title) override;
+ void setAppId(const QString &appId) override;
- void raise() Q_DECL_OVERRIDE;
- void lower() Q_DECL_OVERRIDE;
- void setContentOrientationMask(Qt::ScreenOrientations orientation) Q_DECL_OVERRIDE;
- void setWindowFlags(Qt::WindowFlags flags) Q_DECL_OVERRIDE;
- void sendProperty(const QString &name, const QVariant &value) Q_DECL_OVERRIDE;
+ void raise() override;
+ void lower() override;
+ void setContentOrientationMask(Qt::ScreenOrientations orientation) override;
+ void setWindowFlags(Qt::WindowFlags flags) override;
+ void sendProperty(const QString &name, const QVariant &value) override;
bool isFullscreen() const { return m_fullscreen; }
bool isMaximized() const { return m_maximized; }
@@ -102,10 +102,10 @@ public:
void setType(Qt::WindowType type, QWaylandWindow *transientParent) override;
private:
- void setMaximized() Q_DECL_OVERRIDE;
- void setFullscreen() Q_DECL_OVERRIDE;
- void setNormal() Q_DECL_OVERRIDE;
- void setMinimized() Q_DECL_OVERRIDE;
+ void setMaximized() override;
+ void setFullscreen() override;
+ void setNormal() override;
+ void setMinimized() override;
void updateTransientParent(QWaylandWindow *parent);
@@ -123,8 +123,8 @@ private:
void xdg_surface_configure(int32_t width,
int32_t height,
struct wl_array *states,
- uint32_t serial) Q_DECL_OVERRIDE;
- void xdg_surface_close() Q_DECL_OVERRIDE;
+ uint32_t serial) override;
+ void xdg_surface_close() override;
friend class QWaylandWindow;
};
diff --git a/src/compositor/compositor_api/compositor_api.pri b/src/compositor/compositor_api/compositor_api.pri
index 1e9284c6..35f57f80 100644
--- a/src/compositor/compositor_api/compositor_api.pri
+++ b/src/compositor/compositor_api/compositor_api.pri
@@ -19,7 +19,6 @@ HEADERS += \
compositor_api/qwaylandoutput.h \
compositor_api/qwaylandoutputmode.h \
compositor_api/qwaylandoutputmode_p.h \
- compositor_api/qwaylanddrag.h \
compositor_api/qwaylandbufferref.h \
compositor_api/qwaylanddestroylistener.h \
compositor_api/qwaylanddestroylistener_p.h \
@@ -27,8 +26,6 @@ HEADERS += \
compositor_api/qwaylandview_p.h \
compositor_api/qwaylandresource.h \
compositor_api/qwaylandsurfacegrabber.h \
- compositor_api/qwaylandinputmethodcontrol.h \
- compositor_api/qwaylandinputmethodcontrol_p.h \
compositor_api/qwaylandoutputmode_p.h
SOURCES += \
@@ -42,16 +39,29 @@ SOURCES += \
compositor_api/qwaylandtouch.cpp \
compositor_api/qwaylandoutput.cpp \
compositor_api/qwaylandoutputmode.cpp \
- compositor_api/qwaylanddrag.cpp \
compositor_api/qwaylandbufferref.cpp \
compositor_api/qwaylanddestroylistener.cpp \
compositor_api/qwaylandview.cpp \
compositor_api/qwaylandresource.cpp \
- compositor_api/qwaylandsurfacegrabber.cpp \
- compositor_api/qwaylandinputmethodcontrol.cpp
+ compositor_api/qwaylandsurfacegrabber.cpp
+
+qtConfig(im) {
+ HEADERS += \
+ compositor_api/qwaylandinputmethodcontrol.h \
+ compositor_api/qwaylandinputmethodcontrol_p.h
+ SOURCES += \
+ compositor_api/qwaylandinputmethodcontrol.cpp
+}
QT += core-private
+qtConfig(draganddrop) {
+ HEADERS += \
+ compositor_api/qwaylanddrag.h
+ SOURCES += \
+ compositor_api/qwaylanddrag.cpp
+}
+
qtHaveModule(quick):qtConfig(opengl) {
DEFINES += QT_WAYLAND_COMPOSITOR_QUICK
diff --git a/src/compositor/compositor_api/qwaylandcompositor.cpp b/src/compositor/compositor_api/qwaylandcompositor.cpp
index 29397f64..499d81b3 100644
--- a/src/compositor/compositor_api/qwaylandcompositor.cpp
+++ b/src/compositor/compositor_api/qwaylandcompositor.cpp
@@ -99,7 +99,7 @@ class WindowSystemEventHandler : public QWindowSystemEventHandler
{
public:
WindowSystemEventHandler(QWaylandCompositor *c) : compositor(c) {}
- bool sendEvent(QWindowSystemInterfacePrivate::WindowSystemEvent *e) Q_DECL_OVERRIDE
+ bool sendEvent(QWindowSystemInterfacePrivate::WindowSystemEvent *e) override
{
if (e->type == QWindowSystemInterfacePrivate::Key) {
QWindowSystemInterfacePrivate::KeyEvent *ke = static_cast<QWindowSystemInterfacePrivate::KeyEvent *>(e);
diff --git a/src/compositor/compositor_api/qwaylandcompositor_p.h b/src/compositor/compositor_api/qwaylandcompositor_p.h
index e59fdcbb..f85fd8cc 100644
--- a/src/compositor/compositor_api/qwaylandcompositor_p.h
+++ b/src/compositor/compositor_api/qwaylandcompositor_p.h
@@ -108,10 +108,10 @@ public:
inline void addOutput(QWaylandOutput *output);
inline void removeOutput(QWaylandOutput *output);
protected:
- void compositor_create_surface(wl_compositor::Resource *resource, uint32_t id) Q_DECL_OVERRIDE;
- void compositor_create_region(wl_compositor::Resource *resource, uint32_t id) Q_DECL_OVERRIDE;
+ void compositor_create_surface(wl_compositor::Resource *resource, uint32_t id) override;
+ void compositor_create_region(wl_compositor::Resource *resource, uint32_t id) override;
- void subcompositor_get_subsurface(wl_subcompositor::Resource *resource, uint32_t id, struct ::wl_resource *surface, struct ::wl_resource *parent) Q_DECL_OVERRIDE;
+ void subcompositor_get_subsurface(wl_subcompositor::Resource *resource, uint32_t id, struct ::wl_resource *surface, struct ::wl_resource *parent) override;
virtual QWaylandSurface *createDefaultSurface();
protected:
diff --git a/src/compositor/compositor_api/qwaylandinputmethodcontrol.cpp b/src/compositor/compositor_api/qwaylandinputmethodcontrol.cpp
index 539fc1b7..d61aabb1 100644
--- a/src/compositor/compositor_api/qwaylandinputmethodcontrol.cpp
+++ b/src/compositor/compositor_api/qwaylandinputmethodcontrol.cpp
@@ -54,9 +54,7 @@ QWaylandInputMethodControl::QWaylandInputMethodControl(QWaylandSurface *surface)
if (textInput) {
connect(textInput, &QWaylandTextInput::surfaceEnabled, this, &QWaylandInputMethodControl::surfaceEnabled);
connect(textInput, &QWaylandTextInput::surfaceDisabled, this, &QWaylandInputMethodControl::surfaceDisabled);
-#if QT_CONFIG(im)
connect(textInput, &QWaylandTextInput::updateInputMethod, this, &QWaylandInputMethodControl::updateInputMethod);
-#endif
}
}
@@ -101,9 +99,7 @@ void QWaylandInputMethodControl::setEnabled(bool enabled)
d->enabled = enabled;
emit enabledChanged(enabled);
-#if QT_CONFIG(im)
emit updateInputMethod(Qt::ImQueryInput);
-#endif
}
void QWaylandInputMethodControl::surfaceEnabled(QWaylandSurface *surface)
diff --git a/src/compositor/compositor_api/qwaylandinputmethodcontrol.h b/src/compositor/compositor_api/qwaylandinputmethodcontrol.h
index af02e1ae..58d0eaff 100644
--- a/src/compositor/compositor_api/qwaylandinputmethodcontrol.h
+++ b/src/compositor/compositor_api/qwaylandinputmethodcontrol.h
@@ -57,9 +57,7 @@ class QWaylandInputMethodControl : public QObject
public:
explicit QWaylandInputMethodControl(QWaylandSurface *surface);
-#if QT_CONFIG(im)
QVariant inputMethodQuery(Qt::InputMethodQuery query, QVariant argument) const;
-#endif
void inputMethodEvent(QInputMethodEvent *event);
@@ -70,9 +68,7 @@ public:
Q_SIGNALS:
void enabledChanged(bool enabled);
-#if QT_CONFIG(im)
void updateInputMethod(Qt::InputMethodQueries queries);
-#endif
private:
void defaultSeatChanged();
diff --git a/src/compositor/compositor_api/qwaylandkeyboard_p.h b/src/compositor/compositor_api/qwaylandkeyboard_p.h
index b65dab44..47cd11d0 100644
--- a/src/compositor/compositor_api/qwaylandkeyboard_p.h
+++ b/src/compositor/compositor_api/qwaylandkeyboard_p.h
@@ -97,9 +97,9 @@ public:
void sendEnter(QWaylandSurface *surface, Resource *resource);
protected:
- void keyboard_bind_resource(Resource *resource) Q_DECL_OVERRIDE;
- void keyboard_destroy_resource(Resource *resource) Q_DECL_OVERRIDE;
- void keyboard_release(Resource *resource) Q_DECL_OVERRIDE;
+ void keyboard_bind_resource(Resource *resource) override;
+ void keyboard_destroy_resource(Resource *resource) override;
+ void keyboard_release(Resource *resource) override;
private:
#if QT_CONFIG(xkbcommon_evdev)
diff --git a/src/compositor/compositor_api/qwaylandoutput.cpp b/src/compositor/compositor_api/qwaylandoutput.cpp
index 0129bd33..48d743f1 100644
--- a/src/compositor/compositor_api/qwaylandoutput.cpp
+++ b/src/compositor/compositor_api/qwaylandoutput.cpp
@@ -276,7 +276,7 @@ void QWaylandOutput::initialize()
// Replace modes with one that follows the window size and refresh rate,
// but only if window size is valid
if (d->window && d->sizeFollowsWindow) {
- QWaylandOutputMode mode(d->window->size(),
+ QWaylandOutputMode mode(d->window->size() * d->window->devicePixelRatio(),
qFloor(d->window->screen()->refreshRate() * 1000));
if (mode.isValid()) {
d->modes.clear();
@@ -933,13 +933,13 @@ void QWaylandOutput::handleSetWidth(int newWidth)
if (d->currentMode <= d->modes.size() - 1) {
if (d->currentMode >= 0) {
QWaylandOutputMode mode = d->modes.at(d->currentMode);
- mode.setWidth(newWidth);
+ mode.setWidth(newWidth * d->window->devicePixelRatio());
d->modes.replace(d->currentMode, mode);
d->sendModesInfo();
} else {
// We didn't add a mode during the initialization because the window
// size was invalid, let's add it now
- QWaylandOutputMode mode(d->window->size(),
+ QWaylandOutputMode mode(d->window->size() * d->window->devicePixelRatio(),
qFloor(d->window->screen()->refreshRate() * 1000));
if (mode.isValid()) {
d->modes.clear();
@@ -963,13 +963,13 @@ void QWaylandOutput::handleSetHeight(int newHeight)
if (d->currentMode <= d->modes.size() - 1) {
if (d->currentMode >= 0) {
QWaylandOutputMode mode = d->modes.at(d->currentMode);
- mode.setHeight(newHeight);
+ mode.setHeight(newHeight * d->window->devicePixelRatio());
d->modes.replace(d->currentMode, mode);
d->sendModesInfo();
} else {
// We didn't add a mode during the initialization because the window
// size was invalid, let's add it now
- QWaylandOutputMode mode(d->window->size(),
+ QWaylandOutputMode mode(d->window->size() * d->window->devicePixelRatio(),
qFloor(d->window->screen()->refreshRate() * 1000));
if (mode.isValid()) {
d->modes.clear();
diff --git a/src/compositor/compositor_api/qwaylandoutput.h b/src/compositor/compositor_api/qwaylandoutput.h
index 190231c1..9200ad2c 100644
--- a/src/compositor/compositor_api/qwaylandoutput.h
+++ b/src/compositor/compositor_api/qwaylandoutput.h
@@ -183,7 +183,7 @@ private Q_SLOTS:
void handleWindowDestroyed();
protected:
- bool event(QEvent *event) Q_DECL_OVERRIDE;
+ bool event(QEvent *event) override;
virtual void initialize();
};
diff --git a/src/compositor/compositor_api/qwaylandoutput_p.h b/src/compositor/compositor_api/qwaylandoutput_p.h
index dffde7f9..3a95f40c 100644
--- a/src/compositor/compositor_api/qwaylandoutput_p.h
+++ b/src/compositor/compositor_api/qwaylandoutput_p.h
@@ -110,7 +110,7 @@ public:
void sendModesInfo();
protected:
- void output_bind_resource(Resource *resource) Q_DECL_OVERRIDE;
+ void output_bind_resource(Resource *resource) override;
private:
QWaylandCompositor *compositor;
diff --git a/src/compositor/compositor_api/qwaylandpointer_p.h b/src/compositor/compositor_api/qwaylandpointer_p.h
index c02f831b..123f6b87 100644
--- a/src/compositor/compositor_api/qwaylandpointer_p.h
+++ b/src/compositor/compositor_api/qwaylandpointer_p.h
@@ -79,9 +79,9 @@ public:
QWaylandCompositor *compositor() const { return seat->compositor(); }
protected:
- void pointer_set_cursor(Resource *resource, uint32_t serial, wl_resource *surface, int32_t hotspot_x, int32_t hotspot_y) Q_DECL_OVERRIDE;
- void pointer_release(Resource *resource) Q_DECL_OVERRIDE;
- void pointer_destroy_resource(Resource *resource) Q_DECL_OVERRIDE;
+ void pointer_set_cursor(Resource *resource, uint32_t serial, wl_resource *surface, int32_t hotspot_x, int32_t hotspot_y) override;
+ void pointer_release(Resource *resource) override;
+ void pointer_destroy_resource(Resource *resource) override;
private:
void focusDestroyed(void *data);
diff --git a/src/compositor/compositor_api/qwaylandquickcompositor.cpp b/src/compositor/compositor_api/qwaylandquickcompositor.cpp
index b69e2079..a024ae39 100644
--- a/src/compositor/compositor_api/qwaylandquickcompositor.cpp
+++ b/src/compositor/compositor_api/qwaylandquickcompositor.cpp
@@ -62,7 +62,7 @@ public:
{
}
protected:
- QWaylandSurface *createDefaultSurface() Q_DECL_OVERRIDE
+ QWaylandSurface *createDefaultSurface() override
{
return new QWaylandQuickSurface();
}
@@ -135,7 +135,7 @@ void QWaylandQuickCompositor::grabSurface(QWaylandSurfaceGrabber *grabber, const
QWaylandSurfaceGrabber *grabber;
QWaylandBufferRef buffer;
- void run() Q_DECL_OVERRIDE
+ void run() override
{
QOpenGLFramebufferObject fbo(buffer.size());
fbo.bind();
diff --git a/src/compositor/compositor_api/qwaylandquickcompositor.h b/src/compositor/compositor_api/qwaylandquickcompositor.h
index f6fb118a..5c4562f0 100644
--- a/src/compositor/compositor_api/qwaylandquickcompositor.h
+++ b/src/compositor/compositor_api/qwaylandquickcompositor.h
@@ -52,13 +52,13 @@ class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandQuickCompositor : public QWaylandCompo
Q_OBJECT
public:
QWaylandQuickCompositor(QObject *parent = nullptr);
- void create() Q_DECL_OVERRIDE;
+ void create() override;
- void grabSurface(QWaylandSurfaceGrabber *grabber, const QWaylandBufferRef &buffer) Q_DECL_OVERRIDE;
+ void grabSurface(QWaylandSurfaceGrabber *grabber, const QWaylandBufferRef &buffer) override;
protected:
- void classBegin() Q_DECL_OVERRIDE;
- void componentComplete() Q_DECL_OVERRIDE;
+ void classBegin() override;
+ void componentComplete() override;
};
QT_END_NAMESPACE
diff --git a/src/compositor/compositor_api/qwaylandquickitem.cpp b/src/compositor/compositor_api/qwaylandquickitem.cpp
index 7e44dfae..ee9fa542 100644
--- a/src/compositor/compositor_api/qwaylandquickitem.cpp
+++ b/src/compositor/compositor_api/qwaylandquickitem.cpp
@@ -297,7 +297,7 @@ public:
emit textureChanged();
}
- QSGTexture *texture() const Q_DECL_OVERRIDE
+ QSGTexture *texture() const override
{
if (m_sgTex)
m_sgTex->setFiltering(m_smooth ? QSGTexture::Linear : QSGTexture::Nearest);
@@ -588,6 +588,7 @@ void QWaylandQuickItem::hoverLeaveEvent(QHoverEvent *event)
}
}
+#if QT_CONFIG(wheelevent)
/*!
* \internal
*/
@@ -606,6 +607,7 @@ void QWaylandQuickItem::wheelEvent(QWheelEvent *event)
event->ignore();
}
}
+#endif
/*!
* \internal
@@ -660,6 +662,12 @@ void QWaylandQuickItem::touchEvent(QTouchEvent *event)
}
seat->sendFullTouchEvent(surface(), event);
+ if (event->type() == QEvent::TouchBegin) {
+ d->touchingSeats.append(seat);
+ } else if (event->type() == QEvent::TouchEnd || event->type() == QEvent::TouchCancel) {
+ d->touchingSeats.removeOne(seat);
+ }
+
if (event->type() == QEvent::TouchBegin && d->focusOnClick)
takeFocus(seat);
} else {
@@ -667,6 +675,14 @@ void QWaylandQuickItem::touchEvent(QTouchEvent *event)
}
}
+void QWaylandQuickItem::touchUngrabEvent()
+{
+ Q_D(QWaylandQuickItem);
+ for (auto seat : d->touchingSeats)
+ seat->sendTouchCancelEvent(surface()->client());
+ d->touchingSeats.clear();
+}
+
#if QT_CONFIG(im)
/*!
* \internal
@@ -1266,5 +1282,10 @@ void QWaylandQuickItem::handleDragStarted(QWaylandDrag *drag)
d->isDragging = true;
}
-QT_END_NAMESPACE
+qreal QWaylandQuickItemPrivate::scaleFactor() const
+{
+ return (view->output() ? view->output()->scaleFactor() : 1)
+ / (window ? window->devicePixelRatio() : 1);
+}
+QT_END_NAMESPACE
diff --git a/src/compositor/compositor_api/qwaylandquickitem.h b/src/compositor/compositor_api/qwaylandquickitem.h
index 87d10b02..eb014a20 100644
--- a/src/compositor/compositor_api/qwaylandquickitem.h
+++ b/src/compositor/compositor_api/qwaylandquickitem.h
@@ -82,8 +82,8 @@ public:
QWaylandSurface::Origin origin() const;
- bool isTextureProvider() const Q_DECL_OVERRIDE;
- QSGTextureProvider *textureProvider() const Q_DECL_OVERRIDE;
+ bool isTextureProvider() const override;
+ QSGTextureProvider *textureProvider() const override;
bool paintEnabled() const;
bool touchEventsEnabled() const;
@@ -103,7 +103,7 @@ public:
void setSizeFollowsSurface(bool sizeFollowsSurface);
#if QT_CONFIG(im)
- QVariant inputMethodQuery(Qt::InputMethodQuery query) const Q_DECL_OVERRIDE;
+ QVariant inputMethodQuery(Qt::InputMethodQuery query) const override;
Q_INVOKABLE QVariant inputMethodQuery(Qt::InputMethodQuery query, QVariant argument) const;
#endif
@@ -122,21 +122,24 @@ public:
Q_INVOKABLE void setPrimary();
protected:
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void hoverEnterEvent(QHoverEvent *event) Q_DECL_OVERRIDE;
- void hoverMoveEvent(QHoverEvent *event) Q_DECL_OVERRIDE;
- void hoverLeaveEvent(QHoverEvent *event) Q_DECL_OVERRIDE;
- void wheelEvent(QWheelEvent *event) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
+ void hoverEnterEvent(QHoverEvent *event) override;
+ void hoverMoveEvent(QHoverEvent *event) override;
+ void hoverLeaveEvent(QHoverEvent *event) override;
+#if QT_CONFIG(wheelevent)
+ void wheelEvent(QWheelEvent *event) override;
+#endif
- void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
- void keyReleaseEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
+ void keyPressEvent(QKeyEvent *event) override;
+ void keyReleaseEvent(QKeyEvent *event) override;
- void touchEvent(QTouchEvent *event) Q_DECL_OVERRIDE;
+ void touchEvent(QTouchEvent *event) override;
+ void touchUngrabEvent() override;
#if QT_CONFIG(im)
- void inputMethodEvent(QInputMethodEvent *event) Q_DECL_OVERRIDE;
+ void inputMethodEvent(QInputMethodEvent *event) override;
#endif
virtual void surfaceChangedEvent(QWaylandSurface *newSurface, QWaylandSurface *oldSurface);
@@ -176,7 +179,7 @@ Q_SIGNALS:
void bufferLockedChanged();
void allowDiscardFrontBufferChanged();
protected:
- QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) Q_DECL_OVERRIDE;
+ QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *) override;
QWaylandQuickItem(QWaylandQuickItemPrivate &dd, QQuickItem *parent = nullptr);
};
diff --git a/src/compositor/compositor_api/qwaylandquickitem_p.h b/src/compositor/compositor_api/qwaylandquickitem_p.h
index fc69fe09..fe8fbfd1 100644
--- a/src/compositor/compositor_api/qwaylandquickitem_p.h
+++ b/src/compositor/compositor_api/qwaylandquickitem_p.h
@@ -66,11 +66,11 @@ class QWaylandBufferMaterialShader : public QSGMaterialShader
public:
QWaylandBufferMaterialShader(QWaylandBufferRef::BufferFormatEgl format);
- void updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect) Q_DECL_OVERRIDE;
- char const *const *attributeNames() const Q_DECL_OVERRIDE;
+ void updateState(const RenderState &state, QSGMaterial *newEffect, QSGMaterial *oldEffect) override;
+ char const *const *attributeNames() const override;
protected:
- void initialize() Q_DECL_OVERRIDE;
+ void initialize() override;
private:
const QWaylandBufferRef::BufferFormatEgl m_format;
@@ -89,8 +89,8 @@ public:
void bind();
- QSGMaterialType *type() const Q_DECL_OVERRIDE;
- QSGMaterialShader *createShader() const Q_DECL_OVERRIDE;
+ QSGMaterialType *type() const override;
+ QSGMaterialShader *createShader() const override;
private:
void setTextureParameters(GLenum target);
@@ -159,7 +159,7 @@ public:
}
bool shouldSendInputEvents() const { return view->surface() && inputEventsEnabled; }
- int scaleFactor() const { return view->output() ? view->output()->scaleFactor() : 1; }
+ qreal scaleFactor() const;
static QMutex *mutex;
@@ -178,6 +178,7 @@ public:
QQuickWindow *connectedWindow;
QWaylandSurface::Origin origin;
QPointer<QObject> subsurfaceHandler;
+ QVector<QWaylandSeat *> touchingSeats;
};
QT_END_NAMESPACE
diff --git a/src/compositor/compositor_api/qwaylandquickoutput.h b/src/compositor/compositor_api/qwaylandquickoutput.h
index 37a47b84..446215af 100644
--- a/src/compositor/compositor_api/qwaylandquickoutput.h
+++ b/src/compositor/compositor_api/qwaylandquickoutput.h
@@ -55,7 +55,7 @@ public:
QWaylandQuickOutput();
QWaylandQuickOutput(QWaylandCompositor *compositor, QWindow *window);
- void update() Q_DECL_OVERRIDE;
+ void update() override;
bool automaticFrameCallback() const;
void setAutomaticFrameCallback(bool automatic);
@@ -69,7 +69,7 @@ Q_SIGNALS:
void automaticFrameCallbackChanged();
protected:
- void initialize() Q_DECL_OVERRIDE;
+ void initialize() override;
void classBegin() override;
void componentComplete() override;
diff --git a/src/compositor/compositor_api/qwaylandseat.cpp b/src/compositor/compositor_api/qwaylandseat.cpp
index f6a5276d..7e4c8319 100644
--- a/src/compositor/compositor_api/qwaylandseat.cpp
+++ b/src/compositor/compositor_api/qwaylandseat.cpp
@@ -317,6 +317,7 @@ void QWaylandSeat::sendFullKeyEvent(QKeyEvent *event)
return;
}
+#if QT_CONFIG(im)
if (keyboardFocus()->inputMethodControl()->enabled()
&& event->nativeScanCode() == 0) {
QWaylandTextInput *textInput = QWaylandTextInput::findIn(this);
@@ -325,6 +326,7 @@ void QWaylandSeat::sendFullKeyEvent(QKeyEvent *event)
return;
}
}
+#endif
QtWayland::QtKeyExtensionGlobal *ext = QtWayland::QtKeyExtensionGlobal::findIn(d->compositor);
if (ext && ext->postQtKeyEvent(event, keyboardFocus()))
diff --git a/src/compositor/compositor_api/qwaylandseat_p.h b/src/compositor/compositor_api/qwaylandseat_p.h
index 1d687080..4e0b61ba 100644
--- a/src/compositor/compositor_api/qwaylandseat_p.h
+++ b/src/compositor/compositor_api/qwaylandseat_p.h
@@ -97,16 +97,16 @@ public:
QtWayland::DataDevice *dataDevice() const { return data_device.data(); }
protected:
- void seat_bind_resource(wl_seat::Resource *resource) Q_DECL_OVERRIDE;
+ void seat_bind_resource(wl_seat::Resource *resource) override;
void seat_get_pointer(wl_seat::Resource *resource,
- uint32_t id) Q_DECL_OVERRIDE;
+ uint32_t id) override;
void seat_get_keyboard(wl_seat::Resource *resource,
- uint32_t id) Q_DECL_OVERRIDE;
+ uint32_t id) override;
void seat_get_touch(wl_seat::Resource *resource,
- uint32_t id) Q_DECL_OVERRIDE;
+ uint32_t id) override;
- void seat_destroy_resource(wl_seat::Resource *resource) Q_DECL_OVERRIDE;
+ void seat_destroy_resource(wl_seat::Resource *resource) override;
private:
bool isInitialized;
diff --git a/src/compositor/compositor_api/qwaylandsurface.cpp b/src/compositor/compositor_api/qwaylandsurface.cpp
index f79fd57e..a576e0d6 100644
--- a/src/compositor/compositor_api/qwaylandsurface.cpp
+++ b/src/compositor/compositor_api/qwaylandsurface.cpp
@@ -132,7 +132,9 @@ QWaylandSurfacePrivate::QWaylandSurfacePrivate()
, hasContent(false)
, isInitialized(false)
, contentOrientation(Qt::PrimaryOrientation)
+#if QT_CONFIG(im)
, inputMethodControl(Q_NULLPTR)
+#endif
, subsurface(0)
{
pending.buffer = QWaylandBufferRef();
@@ -419,7 +421,9 @@ void QWaylandSurface::initialize(QWaylandCompositor *compositor, QWaylandClient
d->client = client;
d->init(client->client(), id, version);
d->isInitialized = true;
+#if QT_CONFIG(im)
d->inputMethodControl = new QWaylandInputMethodControl(this);
+#endif
#ifndef QT_NO_DEBUG
QWaylandSurfacePrivate::removeUninitializedSurface(d);
#endif
@@ -665,11 +669,13 @@ bool QWaylandSurface::isCursorSurface() const
return d->isCursorSurface;
}
+#if QT_CONFIG(im)
QWaylandInputMethodControl *QWaylandSurface::inputMethodControl() const
{
Q_D(const QWaylandSurface);
return d->inputMethodControl;
}
+#endif
/*!
* Updates the surface with the compositor's retained clipboard selection. Although
diff --git a/src/compositor/compositor_api/qwaylandsurface.h b/src/compositor/compositor_api/qwaylandsurface.h
index 38043695..e6a16ffe 100644
--- a/src/compositor/compositor_api/qwaylandsurface.h
+++ b/src/compositor/compositor_api/qwaylandsurface.h
@@ -135,7 +135,9 @@ public:
void markAsCursorSurface(bool cursorSurface);
bool isCursorSurface() const;
+#if QT_CONFIG(im)
QWaylandInputMethodControl *inputMethodControl() const;
+#endif
public Q_SLOTS:
void updateSelection();
diff --git a/src/compositor/compositor_api/qwaylandsurface_p.h b/src/compositor/compositor_api/qwaylandsurface_p.h
index 23263107..aea6eda9 100644
--- a/src/compositor/compositor_api/qwaylandsurface_p.h
+++ b/src/compositor/compositor_api/qwaylandsurface_p.h
@@ -117,22 +117,22 @@ public:
QWaylandSurfacePrivate *parentSurface() const { return subsurface ? subsurface->parentSurface : nullptr; }
protected:
- void surface_destroy_resource(Resource *resource) Q_DECL_OVERRIDE;
+ void surface_destroy_resource(Resource *resource) override;
- void surface_destroy(Resource *resource) Q_DECL_OVERRIDE;
+ void surface_destroy(Resource *resource) override;
void surface_attach(Resource *resource,
- struct wl_resource *buffer, int x, int y) Q_DECL_OVERRIDE;
+ struct wl_resource *buffer, int x, int y) override;
void surface_damage(Resource *resource,
- int32_t x, int32_t y, int32_t width, int32_t height) Q_DECL_OVERRIDE;
+ int32_t x, int32_t y, int32_t width, int32_t height) override;
void surface_frame(Resource *resource,
- uint32_t callback) Q_DECL_OVERRIDE;
+ uint32_t callback) override;
void surface_set_opaque_region(Resource *resource,
- struct wl_resource *region) Q_DECL_OVERRIDE;
+ struct wl_resource *region) override;
void surface_set_input_region(Resource *resource,
- struct wl_resource *region) Q_DECL_OVERRIDE;
- void surface_commit(Resource *resource) Q_DECL_OVERRIDE;
- void surface_set_buffer_transform(Resource *resource, int32_t transform) Q_DECL_OVERRIDE;
- void surface_set_buffer_scale(Resource *resource, int32_t bufferScale) Q_DECL_OVERRIDE;
+ struct wl_resource *region) override;
+ void surface_commit(Resource *resource) override;
+ void surface_set_buffer_transform(Resource *resource, int32_t transform) override;
+ void surface_set_buffer_scale(Resource *resource, int32_t bufferScale) override;
QtWayland::ClientBuffer *getBuffer(struct ::wl_resource *buffer);
@@ -171,7 +171,9 @@ public: //member variables
bool isInitialized;
Qt::ScreenOrientation contentOrientation;
QWindow::Visibility visibility;
+#if QT_CONFIG(im)
QWaylandInputMethodControl *inputMethodControl;
+#endif
class Subsurface : public QtWaylandServer::wl_subsurface
{
diff --git a/src/compositor/compositor_api/qwaylandtouch_p.h b/src/compositor/compositor_api/qwaylandtouch_p.h
index 9ee3e9c1..e5f6d3f8 100644
--- a/src/compositor/compositor_api/qwaylandtouch_p.h
+++ b/src/compositor/compositor_api/qwaylandtouch_p.h
@@ -76,7 +76,7 @@ public:
uint sendUp(QWaylandClient *client, uint32_t time, int touch_id);
private:
- void touch_release(Resource *resource) Q_DECL_OVERRIDE;
+ void touch_release(Resource *resource) override;
QWaylandSeat *seat;
};
diff --git a/src/compositor/extensions/qwaylandiviapplication.h b/src/compositor/extensions/qwaylandiviapplication.h
index a3e057a8..c3497b96 100644
--- a/src/compositor/extensions/qwaylandiviapplication.h
+++ b/src/compositor/extensions/qwaylandiviapplication.h
@@ -56,7 +56,7 @@ public:
QWaylandIviApplication();
QWaylandIviApplication(QWaylandCompositor *compositor);
- void initialize() Q_DECL_OVERRIDE;
+ void initialize() override;
static const struct wl_interface *interface();
static QByteArray interfaceName();
diff --git a/src/compositor/extensions/qwaylandiviapplication_p.h b/src/compositor/extensions/qwaylandiviapplication_p.h
index ea211a84..609a945e 100644
--- a/src/compositor/extensions/qwaylandiviapplication_p.h
+++ b/src/compositor/extensions/qwaylandiviapplication_p.h
@@ -71,7 +71,7 @@ public:
QHash<uint, QWaylandIviSurface*> m_iviSurfaces;
protected:
- void ivi_application_surface_create(Resource *resource, uint32_t ivi_id, wl_resource *surface, uint32_t id) Q_DECL_OVERRIDE;
+ void ivi_application_surface_create(Resource *resource, uint32_t ivi_id, wl_resource *surface, uint32_t id) override;
};
QT_END_NAMESPACE
diff --git a/src/compositor/extensions/qwaylandivisurface.cpp b/src/compositor/extensions/qwaylandivisurface.cpp
index 06e12a5a..7feff17d 100644
--- a/src/compositor/extensions/qwaylandivisurface.cpp
+++ b/src/compositor/extensions/qwaylandivisurface.cpp
@@ -37,7 +37,9 @@
#include "qwaylandivisurface.h"
#include "qwaylandivisurface_p.h"
#include "qwaylandiviapplication_p.h"
+#ifdef QT_WAYLAND_COMPOSITOR_QUICK
#include "qwaylandivisurfaceintegration_p.h"
+#endif
#include <QtWaylandCompositor/QWaylandResource>
diff --git a/src/compositor/extensions/qwaylandivisurface.h b/src/compositor/extensions/qwaylandivisurface.h
index ec536507..669a1e2d 100644
--- a/src/compositor/extensions/qwaylandivisurface.h
+++ b/src/compositor/extensions/qwaylandivisurface.h
@@ -73,7 +73,7 @@ public:
Q_INVOKABLE void sendConfigure(const QSize &size);
#ifdef QT_WAYLAND_COMPOSITOR_QUICK
- QWaylandQuickShellIntegration *createIntegration(QWaylandQuickShellSurfaceItem *item) Q_DECL_OVERRIDE;
+ QWaylandQuickShellIntegration *createIntegration(QWaylandQuickShellSurfaceItem *item) override;
#endif
Q_SIGNALS:
@@ -81,7 +81,7 @@ Q_SIGNALS:
void iviIdChanged();
private:
- void initialize() Q_DECL_OVERRIDE;
+ void initialize() override;
};
QT_END_NAMESPACE
diff --git a/src/compositor/extensions/qwaylandivisurface_p.h b/src/compositor/extensions/qwaylandivisurface_p.h
index db237721..8cbec414 100644
--- a/src/compositor/extensions/qwaylandivisurface_p.h
+++ b/src/compositor/extensions/qwaylandivisurface_p.h
@@ -68,8 +68,8 @@ public:
static QWaylandIviSurfacePrivate *get(QWaylandIviSurface *iviSurface) { return iviSurface->d_func(); }
protected:
- void ivi_surface_destroy_resource(Resource *resource) Q_DECL_OVERRIDE;
- void ivi_surface_destroy(Resource *resource) Q_DECL_OVERRIDE;
+ void ivi_surface_destroy_resource(Resource *resource) override;
+ void ivi_surface_destroy(Resource *resource) override;
private:
QWaylandIviApplication *m_iviApplication;
diff --git a/src/compositor/extensions/qwaylandqtwindowmanager.h b/src/compositor/extensions/qwaylandqtwindowmanager.h
index 4d395102..7265abc3 100644
--- a/src/compositor/extensions/qwaylandqtwindowmanager.h
+++ b/src/compositor/extensions/qwaylandqtwindowmanager.h
@@ -61,7 +61,7 @@ public:
void sendQuitMessage(QWaylandClient *client);
- void initialize() Q_DECL_OVERRIDE;
+ void initialize() override;
static const struct wl_interface *interface();
static QByteArray interfaceName();
diff --git a/src/compositor/extensions/qwaylandqtwindowmanager_p.h b/src/compositor/extensions/qwaylandqtwindowmanager_p.h
index a6df2138..992ee6e6 100644
--- a/src/compositor/extensions/qwaylandqtwindowmanager_p.h
+++ b/src/compositor/extensions/qwaylandqtwindowmanager_p.h
@@ -66,9 +66,9 @@ public:
QWaylandQtWindowManagerPrivate();
protected:
- void windowmanager_bind_resource(Resource *resource) Q_DECL_OVERRIDE;
- void windowmanager_destroy_resource(Resource *resource) Q_DECL_OVERRIDE;
- void windowmanager_open_url(Resource *resource, uint32_t remaining, const QString &url) Q_DECL_OVERRIDE;
+ void windowmanager_bind_resource(Resource *resource) override;
+ void windowmanager_destroy_resource(Resource *resource) override;
+ void windowmanager_open_url(Resource *resource, uint32_t remaining, const QString &url) override;
private:
bool showIsFullScreen;
diff --git a/src/compositor/extensions/qwaylandquickshellsurfaceitem.h b/src/compositor/extensions/qwaylandquickshellsurfaceitem.h
index f72b970c..de03163c 100644
--- a/src/compositor/extensions/qwaylandquickshellsurfaceitem.h
+++ b/src/compositor/extensions/qwaylandquickshellsurfaceitem.h
@@ -67,8 +67,8 @@ Q_SIGNALS:
protected:
QWaylandQuickShellSurfaceItem(QWaylandQuickShellSurfaceItemPrivate &dd, QQuickItem *parent);
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void mouseReleaseEvent(QMouseEvent *event) override;
};
QT_END_NAMESPACE
diff --git a/src/compositor/extensions/qwaylandquickshellsurfaceitem_p.h b/src/compositor/extensions/qwaylandquickshellsurfaceitem_p.h
index 3cd9bf22..b9eb5ad6 100644
--- a/src/compositor/extensions/qwaylandquickshellsurfaceitem_p.h
+++ b/src/compositor/extensions/qwaylandquickshellsurfaceitem_p.h
@@ -90,13 +90,13 @@ public:
static void cancelFilter();
protected:
- void timerEvent(QTimerEvent *event) Q_DECL_OVERRIDE;
+ void timerEvent(QTimerEvent *event) override;
private:
void stopFilter();
QWaylandQuickShellEventFilter(QObject *parent = nullptr);
- bool eventFilter(QObject *, QEvent *) Q_DECL_OVERRIDE;
+ bool eventFilter(QObject *, QEvent *) override;
bool eventFilterInstalled;
bool waitForRelease;
QPointer<QWaylandClient> client;
diff --git a/src/compositor/extensions/qwaylandshell.h b/src/compositor/extensions/qwaylandshell.h
index 997573c9..4a9d28cb 100644
--- a/src/compositor/extensions/qwaylandshell.h
+++ b/src/compositor/extensions/qwaylandshell.h
@@ -81,7 +81,7 @@ public:
: QWaylandShell(container)
{ }
- const struct wl_interface *extensionInterface() const Q_DECL_OVERRIDE
+ const struct wl_interface *extensionInterface() const override
{
return T::interface();
}
diff --git a/src/compositor/extensions/qwaylandshellsurface.h b/src/compositor/extensions/qwaylandshellsurface.h
index e8c75327..1df9fed0 100644
--- a/src/compositor/extensions/qwaylandshellsurface.h
+++ b/src/compositor/extensions/qwaylandshellsurface.h
@@ -73,7 +73,7 @@ public:
: QWaylandShellSurface(container)
{ }
- const struct wl_interface *extensionInterface() const Q_DECL_OVERRIDE
+ const struct wl_interface *extensionInterface() const override
{
return T::interface();
}
diff --git a/src/compositor/extensions/qwaylandtextinput_p.h b/src/compositor/extensions/qwaylandtextinput_p.h
index da90cc90..7af24bb2 100644
--- a/src/compositor/extensions/qwaylandtextinput_p.h
+++ b/src/compositor/extensions/qwaylandtextinput_p.h
@@ -115,19 +115,19 @@ public:
QHash<Resource *, QWaylandSurface*> enabledSurfaces;
protected:
- void zwp_text_input_v2_bind_resource(Resource *resource) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_destroy_resource(Resource *resource) Q_DECL_OVERRIDE;
-
- void zwp_text_input_v2_destroy(Resource *resource) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_enable(Resource *resource, wl_resource *surface) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_disable(Resource *resource, wl_resource *surface) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_show_input_panel(Resource *resource) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_hide_input_panel(Resource *resource) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_set_surrounding_text(Resource *resource, const QString &text, int32_t cursor, int32_t anchor) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_set_content_type(Resource *resource, uint32_t hint, uint32_t purpose) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_set_cursor_rectangle(Resource *resource, int32_t x, int32_t y, int32_t width, int32_t height) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_set_preferred_language(Resource *resource, const QString &language) Q_DECL_OVERRIDE;
- void zwp_text_input_v2_update_state(Resource *resource, uint32_t serial, uint32_t flags) Q_DECL_OVERRIDE;
+ void zwp_text_input_v2_bind_resource(Resource *resource) override;
+ void zwp_text_input_v2_destroy_resource(Resource *resource) override;
+
+ void zwp_text_input_v2_destroy(Resource *resource) override;
+ void zwp_text_input_v2_enable(Resource *resource, wl_resource *surface) override;
+ void zwp_text_input_v2_disable(Resource *resource, wl_resource *surface) override;
+ void zwp_text_input_v2_show_input_panel(Resource *resource) override;
+ void zwp_text_input_v2_hide_input_panel(Resource *resource) override;
+ void zwp_text_input_v2_set_surrounding_text(Resource *resource, const QString &text, int32_t cursor, int32_t anchor) override;
+ void zwp_text_input_v2_set_content_type(Resource *resource, uint32_t hint, uint32_t purpose) override;
+ void zwp_text_input_v2_set_cursor_rectangle(Resource *resource, int32_t x, int32_t y, int32_t width, int32_t height) override;
+ void zwp_text_input_v2_set_preferred_language(Resource *resource, const QString &language) override;
+ void zwp_text_input_v2_update_state(Resource *resource, uint32_t serial, uint32_t flags) override;
};
QT_END_NAMESPACE
diff --git a/src/compositor/extensions/qwaylandtextinputmanager.h b/src/compositor/extensions/qwaylandtextinputmanager.h
index 805c61af..4691ed0c 100644
--- a/src/compositor/extensions/qwaylandtextinputmanager.h
+++ b/src/compositor/extensions/qwaylandtextinputmanager.h
@@ -53,7 +53,7 @@ public:
QWaylandTextInputManager();
QWaylandTextInputManager(QWaylandCompositor *compositor);
- void initialize() Q_DECL_OVERRIDE;
+ void initialize() override;
static const struct wl_interface *interface();
static QByteArray interfaceName();
diff --git a/src/compositor/extensions/qwaylandtextinputmanager_p.h b/src/compositor/extensions/qwaylandtextinputmanager_p.h
index 955a5cc8..5034f7e4 100644
--- a/src/compositor/extensions/qwaylandtextinputmanager_p.h
+++ b/src/compositor/extensions/qwaylandtextinputmanager_p.h
@@ -61,7 +61,7 @@ public:
QWaylandTextInputManagerPrivate();
protected:
- void zwp_text_input_manager_v2_get_text_input(Resource *resource, uint32_t id, struct ::wl_resource *seatResource) Q_DECL_OVERRIDE;
+ void zwp_text_input_manager_v2_get_text_input(Resource *resource, uint32_t id, struct ::wl_resource *seatResource) override;
};
QT_END_NAMESPACE
diff --git a/src/compositor/extensions/qwaylandwlshell.h b/src/compositor/extensions/qwaylandwlshell.h
index 7fe07e7a..1ecc15cd 100644
--- a/src/compositor/extensions/qwaylandwlshell.h
+++ b/src/compositor/extensions/qwaylandwlshell.h
@@ -63,7 +63,7 @@ public:
QWaylandWlShell();
QWaylandWlShell(QWaylandCompositor *compositor);
- void initialize() Q_DECL_OVERRIDE;
+ void initialize() override;
QList<QWaylandWlShellSurface *> shellSurfaces() const;
QList<QWaylandWlShellSurface *> shellSurfacesForClient(QWaylandClient* client) const;
QList<QWaylandWlShellSurface *> mappedPopups() const;
@@ -136,7 +136,7 @@ public:
Q_INVOKABLE void sendPopupDone();
#ifdef QT_WAYLAND_COMPOSITOR_QUICK
- QWaylandQuickShellIntegration *createIntegration(QWaylandQuickShellSurfaceItem *item) Q_DECL_OVERRIDE;
+ QWaylandQuickShellIntegration *createIntegration(QWaylandQuickShellSurfaceItem *item) override;
#endif
public Q_SLOTS:
diff --git a/src/compositor/extensions/qwaylandwlshell_p.h b/src/compositor/extensions/qwaylandwlshell_p.h
index 77229ef0..70fd45f7 100644
--- a/src/compositor/extensions/qwaylandwlshell_p.h
+++ b/src/compositor/extensions/qwaylandwlshell_p.h
@@ -76,7 +76,7 @@ public:
static QWaylandWlShellPrivate *get(QWaylandWlShell *shell) { return shell->d_func(); }
protected:
- void shell_get_shell_surface(Resource *resource, uint32_t id, struct ::wl_resource *surface) Q_DECL_OVERRIDE;
+ void shell_get_shell_surface(Resource *resource, uint32_t id, struct ::wl_resource *surface) override;
QList<QWaylandWlShellSurface *> m_shellSurfaces;
};
@@ -106,40 +106,40 @@ private:
QString m_className;
Qt::WindowType m_windowType;
- void shell_surface_destroy_resource(Resource *resource) Q_DECL_OVERRIDE;
+ void shell_surface_destroy_resource(Resource *resource) override;
void shell_surface_move(Resource *resource,
struct wl_resource *input_device_super,
- uint32_t time) Q_DECL_OVERRIDE;
+ uint32_t time) override;
void shell_surface_resize(Resource *resource,
struct wl_resource *input_device,
uint32_t time,
- uint32_t edges) Q_DECL_OVERRIDE;
- void shell_surface_set_toplevel(Resource *resource) Q_DECL_OVERRIDE;
+ uint32_t edges) override;
+ void shell_surface_set_toplevel(Resource *resource) override;
void shell_surface_set_transient(Resource *resource,
struct wl_resource *parent_surface_resource,
int x,
int y,
- uint32_t flags) Q_DECL_OVERRIDE;
+ uint32_t flags) override;
void shell_surface_set_fullscreen(Resource *resource,
uint32_t method,
uint32_t framerate,
- struct wl_resource *output_resource) Q_DECL_OVERRIDE;
+ struct wl_resource *output_resource) override;
void shell_surface_set_popup(Resource *resource,
struct wl_resource *input_device,
uint32_t time,
struct wl_resource *parent,
int32_t x,
int32_t y,
- uint32_t flags) Q_DECL_OVERRIDE;
+ uint32_t flags) override;
void shell_surface_set_maximized(Resource *resource,
- struct wl_resource *output_resource) Q_DECL_OVERRIDE;
+ struct wl_resource *output_resource) override;
void shell_surface_pong(Resource *resource,
- uint32_t serial) Q_DECL_OVERRIDE;
+ uint32_t serial) override;
void shell_surface_set_title(Resource *resource,
- const QString &title) Q_DECL_OVERRIDE;
+ const QString &title) override;
void shell_surface_set_class(Resource *resource,
- const QString &class_) Q_DECL_OVERRIDE;
+ const QString &class_) override;
static QWaylandSurfaceRole s_role;
};
diff --git a/src/compositor/extensions/qwaylandwlshellintegration.cpp b/src/compositor/extensions/qwaylandwlshellintegration.cpp
index abf5b627..b3241676 100644
--- a/src/compositor/extensions/qwaylandwlshellintegration.cpp
+++ b/src/compositor/extensions/qwaylandwlshellintegration.cpp
@@ -125,7 +125,8 @@ void WlShellIntegration::handleSetMaximized(QWaylandOutput *output)
nextState = State::Maximized;
finalPosition = designatedOutput->position() + designatedOutput->availableGeometry().topLeft();
- m_shellSurface->sendConfigure(designatedOutput->availableGeometry().size(), QWaylandWlShellSurface::NoneEdge);
+ auto scaleFactor = m_item->view()->output()->scaleFactor();
+ m_shellSurface->sendConfigure(designatedOutput->availableGeometry().size() / scaleFactor, QWaylandWlShellSurface::NoneEdge);
}
void WlShellIntegration::handleSetFullScreen(QWaylandWlShellSurface::FullScreenMethod method, uint framerate, QWaylandOutput *output)
@@ -176,8 +177,9 @@ void WlShellIntegration::handleSetPopup(QWaylandSeat *seat, QWaylandSurface *par
t.clear(&t);
m_item->setRotation(0);
m_item->setScale(1.0);
- m_item->setX(relativeToParent.x());
- m_item->setY(relativeToParent.y());
+ auto scaleFactor = m_item->output()->scaleFactor() / devicePixelRatio();
+ m_item->setX(relativeToParent.x() * scaleFactor);
+ m_item->setY(relativeToParent.y() * scaleFactor);
m_item->setParentItem(parentItem);
}
@@ -206,6 +208,11 @@ void WlShellIntegration::handlePopupRemoved()
isPopup = false;
}
+qreal WlShellIntegration::devicePixelRatio() const
+{
+ return m_item->window() ? m_item->window()->devicePixelRatio() : 1;
+}
+
void WlShellIntegration::handleShellSurfaceDestroyed()
{
if (isPopup)
@@ -237,7 +244,7 @@ void WlShellIntegration::adjustOffsetForNextFrame(const QPointF &offset)
float scaleFactor = m_item->view()->output()->scaleFactor();
QQuickItem *moveItem = m_item->moveItem();
- moveItem->setPosition(moveItem->position() + offset * scaleFactor);
+ moveItem->setPosition(moveItem->position() + offset * scaleFactor / devicePixelRatio());
}
bool WlShellIntegration::mouseMoveEvent(QMouseEvent *event)
@@ -250,7 +257,7 @@ bool WlShellIntegration::mouseMoveEvent(QMouseEvent *event)
return true;
}
float scaleFactor = m_item->view()->output()->scaleFactor();
- QPointF delta = (event->windowPos() - resizeState.initialMousePos) / scaleFactor;
+ QPointF delta = (event->windowPos() - resizeState.initialMousePos) / scaleFactor * devicePixelRatio();
QSize newSize = m_shellSurface->sizeForResize(resizeState.initialSize, delta, resizeState.resizeEdges);
m_shellSurface->sendConfigure(newSize, resizeState.resizeEdges);
} else if (grabberState == GrabberState::Move) {
diff --git a/src/compositor/extensions/qwaylandwlshellintegration_p.h b/src/compositor/extensions/qwaylandwlshellintegration_p.h
index c0bbcfd1..814f5e12 100644
--- a/src/compositor/extensions/qwaylandwlshellintegration_p.h
+++ b/src/compositor/extensions/qwaylandwlshellintegration_p.h
@@ -61,8 +61,8 @@ class WlShellIntegration : public QWaylandQuickShellIntegration
Q_OBJECT
public:
WlShellIntegration(QWaylandQuickShellSurfaceItem *item);
- bool mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- bool mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ bool mouseMoveEvent(QMouseEvent *event) override;
+ bool mouseReleaseEvent(QMouseEvent *event) override;
private Q_SLOTS:
void handleStartMove(QWaylandSeat *seat);
@@ -86,6 +86,7 @@ private:
void handlePopupClosed();
void handlePopupRemoved();
+ qreal devicePixelRatio() const;
QWaylandQuickShellSurfaceItem *m_item;
QPointer<QWaylandWlShellSurface> m_shellSurface;
diff --git a/src/compositor/extensions/qwaylandxdgshellv5.cpp b/src/compositor/extensions/qwaylandxdgshellv5.cpp
index 0a86b9f6..80aa52e7 100644
--- a/src/compositor/extensions/qwaylandxdgshellv5.cpp
+++ b/src/compositor/extensions/qwaylandxdgshellv5.cpp
@@ -225,7 +225,7 @@ QWaylandXdgSurfaceV5Private::QWaylandXdgSurfaceV5Private()
, m_xdgShell(nullptr)
, m_surface(nullptr)
, m_parentSurface(nullptr)
- , m_windowType(UnknownWindowType)
+ , m_windowType(Qt::WindowType::Window)
, m_unsetWindowGeometry(true)
, m_lastAckedConfigure({{}, QSize(0, 0), 0})
{
@@ -272,6 +272,17 @@ void QWaylandXdgSurfaceV5Private::updateFallbackWindowGeometry()
emit q->windowGeometryChanged();
}
+void QWaylandXdgSurfaceV5Private::setWindowType(Qt::WindowType windowType)
+{
+ if (m_windowType == windowType)
+ return;
+
+ m_windowType = windowType;
+
+ Q_Q(QWaylandXdgSurfaceV5);
+ emit q->windowTypeChanged();
+}
+
void QWaylandXdgSurfaceV5Private::xdg_surface_destroy_resource(Resource *resource)
{
Q_UNUSED(resource);
@@ -358,13 +369,13 @@ void QWaylandXdgSurfaceV5Private::xdg_surface_set_parent(Resource *resource, wl_
emit q->parentSurfaceChanged();
}
- if (m_parentSurface && m_windowType != TransientWindowType) {
+ if (m_parentSurface && m_windowType != Qt::WindowType::SubWindow) {
// There's a parent now, which means the surface is transient
- m_windowType = TransientWindowType;
+ setWindowType(Qt::WindowType::SubWindow);
emit q->setTransient();
- } else if (!m_parentSurface && m_windowType != TopLevelWindowType) {
+ } else if (!m_parentSurface && m_windowType != Qt::WindowType::Window) {
// When the surface has no parent it is toplevel
- m_windowType = TopLevelWindowType;
+ setWindowType(Qt::WindowType::Window);
emit q->setTopLevel();
}
}
@@ -758,6 +769,23 @@ QWaylandSurface *QWaylandXdgSurfaceV5::surface() const
}
/*!
+ * \qmlproperty enum QtWaylandCompositor::XdgSurfaceV5::windowType
+ *
+ * This property holds the window type of the XdgSurfaceV5.
+ */
+
+/*!
+ * \property QWaylandXdgSurfaceV5::windowType
+ *
+ * This property holds the window type of the QWaylandXdgSurfaceV5.
+ */
+Qt::WindowType QWaylandXdgSurfaceV5::windowType() const
+{
+ Q_D(const QWaylandXdgSurfaceV5);
+ return d->m_windowType;
+}
+
+/*!
* \qmlproperty object QtWaylandCompositor::XdgSurface::parentSurface
*
* This property holds the XdgSurface parent of this XdgSurface.
diff --git a/src/compositor/extensions/qwaylandxdgshellv5.h b/src/compositor/extensions/qwaylandxdgshellv5.h
index bcc740c7..269ea893 100644
--- a/src/compositor/extensions/qwaylandxdgshellv5.h
+++ b/src/compositor/extensions/qwaylandxdgshellv5.h
@@ -68,7 +68,7 @@ public:
QWaylandXdgShellV5();
QWaylandXdgShellV5(QWaylandCompositor *compositor);
- void initialize() Q_DECL_OVERRIDE;
+ void initialize() override;
QWaylandClient *popupClient() const;
static const struct wl_interface *interface();
@@ -135,6 +135,8 @@ public:
Q_INVOKABLE void initialize(QWaylandXdgShellV5* xdgShell, QWaylandSurface *surface, const QWaylandResource &resource);
+ Qt::WindowType windowType() const override;
+
QString title() const;
QString appId() const;
QRect windowGeometry() const;
@@ -165,7 +167,7 @@ public:
Q_INVOKABLE uint sendResizing(const QSize &maxSize);
#ifdef QT_WAYLAND_COMPOSITOR_QUICK
- QWaylandQuickShellIntegration *createIntegration(QWaylandQuickShellSurfaceItem *item) Q_DECL_OVERRIDE;
+ QWaylandQuickShellIntegration *createIntegration(QWaylandQuickShellSurfaceItem *item) override;
#endif
Q_SIGNALS:
@@ -236,7 +238,7 @@ public:
Q_INVOKABLE void sendPopupDone();
#ifdef QT_WAYLAND_COMPOSITOR_QUICK
- QWaylandQuickShellIntegration *createIntegration(QWaylandQuickShellSurfaceItem *item) Q_DECL_OVERRIDE;
+ QWaylandQuickShellIntegration *createIntegration(QWaylandQuickShellSurfaceItem *item) override;
#endif
Q_SIGNALS:
diff --git a/src/compositor/extensions/qwaylandxdgshellv5_p.h b/src/compositor/extensions/qwaylandxdgshellv5_p.h
index 31aa2112..8e74a6a2 100644
--- a/src/compositor/extensions/qwaylandxdgshellv5_p.h
+++ b/src/compositor/extensions/qwaylandxdgshellv5_p.h
@@ -80,14 +80,14 @@ public:
QWaylandXdgSurfaceV5 *xdgSurfaceFromSurface(QWaylandSurface *surface);
protected:
- void xdg_shell_destroy(Resource *resource) Q_DECL_OVERRIDE;
+ void xdg_shell_destroy(Resource *resource) override;
void xdg_shell_get_xdg_surface(Resource *resource, uint32_t id,
- struct ::wl_resource *surface) Q_DECL_OVERRIDE;
- void xdg_shell_use_unstable_version(Resource *resource, int32_t version) Q_DECL_OVERRIDE;
+ struct ::wl_resource *surface) override;
+ void xdg_shell_use_unstable_version(Resource *resource, int32_t version) override;
void xdg_shell_get_xdg_popup(Resource *resource, uint32_t id, struct ::wl_resource *surface,
struct ::wl_resource *parent, struct ::wl_resource *seatResource,
- uint32_t serial, int32_t x, int32_t y) Q_DECL_OVERRIDE;
- void xdg_shell_pong(Resource *resource, uint32_t serial) Q_DECL_OVERRIDE;
+ uint32_t serial, int32_t x, int32_t y) override;
+ void xdg_shell_pong(Resource *resource, uint32_t serial) override;
};
class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandXdgSurfaceV5Private
@@ -99,12 +99,6 @@ public:
QWaylandXdgSurfaceV5Private();
static QWaylandXdgSurfaceV5Private *get(QWaylandXdgSurfaceV5 *xdgSurface) { return xdgSurface->d_func(); }
- enum WindowType {
- UnknownWindowType,
- TopLevelWindowType,
- TransientWindowType
- };
-
struct ConfigureEvent {
QVector<uint> states;
QSize size;
@@ -116,12 +110,14 @@ public:
QRect calculateFallbackWindowGeometry() const;
void updateFallbackWindowGeometry();
+ void setWindowType(Qt::WindowType windowType);
+
private:
QWaylandXdgShellV5 *m_xdgShell;
QWaylandSurface *m_surface;
QWaylandXdgSurfaceV5 *m_parentSurface;
- WindowType m_windowType;
+ Qt::WindowType m_windowType;
QString m_title;
QString m_appId;
@@ -132,27 +128,27 @@ private:
ConfigureEvent m_lastAckedConfigure;
ConfigureEvent lastSentConfigure() const { return m_pendingConfigures.empty() ? m_lastAckedConfigure : m_pendingConfigures.first(); }
- void xdg_surface_destroy_resource(Resource *resource) Q_DECL_OVERRIDE;
+ void xdg_surface_destroy_resource(Resource *resource) override;
- void xdg_surface_destroy(Resource *resource) Q_DECL_OVERRIDE;
+ void xdg_surface_destroy(Resource *resource) override;
void xdg_surface_move(Resource *resource, struct ::wl_resource *seat,
- uint32_t serial) Q_DECL_OVERRIDE;
+ uint32_t serial) override;
void xdg_surface_resize(Resource *resource, struct ::wl_resource *seat, uint32_t serial,
- uint32_t edges) Q_DECL_OVERRIDE;
- void xdg_surface_set_maximized(Resource *resource) Q_DECL_OVERRIDE;
- void xdg_surface_unset_maximized(Resource *resource) Q_DECL_OVERRIDE;
+ uint32_t edges) override;
+ void xdg_surface_set_maximized(Resource *resource) override;
+ void xdg_surface_unset_maximized(Resource *resource) override;
void xdg_surface_set_fullscreen(Resource *resource,
- struct ::wl_resource *output) Q_DECL_OVERRIDE;
- void xdg_surface_unset_fullscreen(Resource *resource) Q_DECL_OVERRIDE;
- void xdg_surface_set_minimized(Resource *resource) Q_DECL_OVERRIDE;
- void xdg_surface_set_parent(Resource *resource, struct ::wl_resource *parent) Q_DECL_OVERRIDE;
- void xdg_surface_set_app_id(Resource *resource, const QString &app_id) Q_DECL_OVERRIDE;
+ struct ::wl_resource *output) override;
+ void xdg_surface_unset_fullscreen(Resource *resource) override;
+ void xdg_surface_set_minimized(Resource *resource) override;
+ void xdg_surface_set_parent(Resource *resource, struct ::wl_resource *parent) override;
+ void xdg_surface_set_app_id(Resource *resource, const QString &app_id) override;
void xdg_surface_show_window_menu(Resource *resource, struct ::wl_resource *seatResource,
- uint32_t serial, int32_t x, int32_t y) Q_DECL_OVERRIDE;
- void xdg_surface_ack_configure(Resource *resource, uint32_t serial) Q_DECL_OVERRIDE;
- void xdg_surface_set_title(Resource *resource, const QString &title) Q_DECL_OVERRIDE;
+ uint32_t serial, int32_t x, int32_t y) override;
+ void xdg_surface_ack_configure(Resource *resource, uint32_t serial) override;
+ void xdg_surface_set_title(Resource *resource, const QString &title) override;
void xdg_surface_set_window_geometry(Resource *resource, int32_t x, int32_t y,
- int32_t width, int32_t height) Q_DECL_OVERRIDE;
+ int32_t width, int32_t height) override;
static QWaylandSurfaceRole s_role;
};
@@ -172,8 +168,8 @@ public:
QWaylandXdgShellV5 *m_xdgShell;
QPoint m_position;
- void xdg_popup_destroy_resource(Resource *resource) Q_DECL_OVERRIDE;
- void xdg_popup_destroy(xdg_popup::Resource *resource) Q_DECL_OVERRIDE;
+ void xdg_popup_destroy_resource(Resource *resource) override;
+ void xdg_popup_destroy(xdg_popup::Resource *resource) override;
static QWaylandSurfaceRole s_role;
};
diff --git a/src/compositor/extensions/qwaylandxdgshellv5integration_p.h b/src/compositor/extensions/qwaylandxdgshellv5integration_p.h
index da4573c7..6f02ab39 100644
--- a/src/compositor/extensions/qwaylandxdgshellv5integration_p.h
+++ b/src/compositor/extensions/qwaylandxdgshellv5integration_p.h
@@ -60,8 +60,8 @@ class XdgShellV5Integration : public QWaylandQuickShellIntegration
Q_OBJECT
public:
XdgShellV5Integration(QWaylandQuickShellSurfaceItem *item);
- bool mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- bool mouseReleaseEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ bool mouseMoveEvent(QMouseEvent *event) override;
+ bool mouseReleaseEvent(QMouseEvent *event) override;
private Q_SLOTS:
void handleStartMove(QWaylandSeat *seat);
diff --git a/src/compositor/extensions/qwlextendedsurface_p.h b/src/compositor/extensions/qwlextendedsurface_p.h
index a868cd83..2317d1a4 100644
--- a/src/compositor/extensions/qwlextendedsurface_p.h
+++ b/src/compositor/extensions/qwlextendedsurface_p.h
@@ -136,17 +136,17 @@ private:
void extended_surface_update_generic_property(Resource *resource,
const QString &name,
- struct wl_array *value) Q_DECL_OVERRIDE;
+ struct wl_array *value) override;
void extended_surface_set_content_orientation_mask(Resource *resource,
- int32_t orientation) Q_DECL_OVERRIDE;
+ int32_t orientation) override;
void extended_surface_set_window_flags(Resource *resource,
- int32_t flags) Q_DECL_OVERRIDE;
+ int32_t flags) override;
- void extended_surface_destroy_resource(Resource *) Q_DECL_OVERRIDE;
- void extended_surface_raise(Resource *) Q_DECL_OVERRIDE;
- void extended_surface_lower(Resource *) Q_DECL_OVERRIDE;
+ void extended_surface_destroy_resource(Resource *) override;
+ void extended_surface_raise(Resource *) override;
+ void extended_surface_lower(Resource *) override;
};
}
diff --git a/src/compositor/extensions/qwlqttouch_p.h b/src/compositor/extensions/qwlqttouch_p.h
index f3697aa8..d659872a 100644
--- a/src/compositor/extensions/qwlqttouch_p.h
+++ b/src/compositor/extensions/qwlqttouch_p.h
@@ -86,8 +86,8 @@ Q_SIGNALS:
void behaviorFlagsChanged();
protected:
- void touch_extension_bind_resource(Resource *resource) Q_DECL_OVERRIDE;
- void touch_extension_destroy_resource(Resource *resource) Q_DECL_OVERRIDE;
+ void touch_extension_bind_resource(Resource *resource) override;
+ void touch_extension_destroy_resource(Resource *resource) override;
private:
QWaylandCompositor *m_compositor;
diff --git a/src/compositor/global/qwaylandcompositorextension.h b/src/compositor/global/qwaylandcompositorextension.h
index e9aa8460..fe8a7ff1 100644
--- a/src/compositor/global/qwaylandcompositorextension.h
+++ b/src/compositor/global/qwaylandcompositorextension.h
@@ -89,7 +89,7 @@ protected:
QWaylandCompositorExtension(QWaylandCompositorExtensionPrivate &dd);
QWaylandCompositorExtension(QWaylandObject *container, QWaylandCompositorExtensionPrivate &dd);
- bool event(QEvent *event) Q_DECL_OVERRIDE;
+ bool event(QEvent *event) override;
};
template <typename T>
@@ -104,7 +104,7 @@ public:
: QWaylandCompositorExtension(container)
{ }
- const struct wl_interface *extensionInterface() const Q_DECL_OVERRIDE
+ const struct wl_interface *extensionInterface() const override
{
return T::interface();
}
diff --git a/src/compositor/global/qwaylandquickextension.h b/src/compositor/global/qwaylandquickextension.h
index 63c3d135..d328f7bd 100644
--- a/src/compositor/global/qwaylandquickextension.h
+++ b/src/compositor/global/qwaylandquickextension.h
@@ -56,8 +56,8 @@ QT_BEGIN_NAMESPACE
{ \
return QQmlListProperty<QObject>(this, m_objects); \
} \
- void classBegin() Q_DECL_OVERRIDE {} \
- void componentComplete() Q_DECL_OVERRIDE { initialize(); } \
+ void classBegin() override {} \
+ void componentComplete() override { initialize(); } \
private: \
QList<QObject *> m_objects; \
};
diff --git a/src/compositor/wayland_wrapper/qwlclientbuffer.cpp b/src/compositor/wayland_wrapper/qwlclientbuffer.cpp
index d5295038..f1c55f54 100644
--- a/src/compositor/wayland_wrapper/qwlclientbuffer.cpp
+++ b/src/compositor/wayland_wrapper/qwlclientbuffer.cpp
@@ -114,7 +114,9 @@ QWaylandBufferRef::BufferFormatEgl ClientBuffer::bufferFormatEgl() const
SharedMemoryBuffer::SharedMemoryBuffer(wl_resource *bufferResource)
: ClientBuffer(bufferResource)
+#if QT_CONFIG(opengl)
, m_shmTexture(nullptr)
+#endif
{
}
diff --git a/src/compositor/wayland_wrapper/qwlclientbuffer_p.h b/src/compositor/wayland_wrapper/qwlclientbuffer_p.h
index dafb3c5e..efb2eb18 100644
--- a/src/compositor/wayland_wrapper/qwlclientbuffer_p.h
+++ b/src/compositor/wayland_wrapper/qwlclientbuffer_p.h
@@ -128,12 +128,12 @@ class Q_WAYLAND_COMPOSITOR_EXPORT SharedMemoryBuffer : public ClientBuffer
public:
SharedMemoryBuffer(struct ::wl_resource *bufferResource);
- QSize size() const Q_DECL_OVERRIDE;
- QWaylandSurface::Origin origin() const Q_DECL_OVERRIDE;
+ QSize size() const override;
+ QWaylandSurface::Origin origin() const override;
QImage image() const;
#if QT_CONFIG(opengl)
- QOpenGLTexture *toOpenGlTexture(int plane = 0) Q_DECL_OVERRIDE;
+ QOpenGLTexture *toOpenGlTexture(int plane = 0) override;
private:
QOpenGLTexture *m_shmTexture;
diff --git a/src/compositor/wayland_wrapper/qwldatadevice_p.h b/src/compositor/wayland_wrapper/qwldatadevice_p.h
index 17591ae2..57a9c0a8 100644
--- a/src/compositor/wayland_wrapper/qwldatadevice_p.h
+++ b/src/compositor/wayland_wrapper/qwldatadevice_p.h
@@ -79,8 +79,8 @@ public:
void cancelDrag();
protected:
- void data_device_start_drag(Resource *resource, struct ::wl_resource *source, struct ::wl_resource *origin, struct ::wl_resource *icon, uint32_t serial) Q_DECL_OVERRIDE;
- void data_device_set_selection(Resource *resource, struct ::wl_resource *source, uint32_t serial) Q_DECL_OVERRIDE;
+ void data_device_start_drag(Resource *resource, struct ::wl_resource *source, struct ::wl_resource *origin, struct ::wl_resource *icon, uint32_t serial) override;
+ void data_device_set_selection(Resource *resource, struct ::wl_resource *source, uint32_t serial) override;
private:
void setDragIcon(QWaylandSurface *icon);
diff --git a/src/compositor/wayland_wrapper/qwldatadevicemanager_p.h b/src/compositor/wayland_wrapper/qwldatadevicemanager_p.h
index 8408db97..483731df 100644
--- a/src/compositor/wayland_wrapper/qwldatadevicemanager_p.h
+++ b/src/compositor/wayland_wrapper/qwldatadevicemanager_p.h
@@ -85,8 +85,8 @@ public:
void offerRetainedSelection(wl_resource *clientDataDeviceResource);
protected:
- void data_device_manager_create_data_source(Resource *resource, uint32_t id) Q_DECL_OVERRIDE;
- void data_device_manager_get_data_device(Resource *resource, uint32_t id, struct ::wl_resource *seat) Q_DECL_OVERRIDE;
+ void data_device_manager_create_data_source(Resource *resource, uint32_t id) override;
+ void data_device_manager_get_data_device(Resource *resource, uint32_t id, struct ::wl_resource *seat) override;
private Q_SLOTS:
void readFromClient(int fd);
diff --git a/src/compositor/wayland_wrapper/qwldataoffer_p.h b/src/compositor/wayland_wrapper/qwldataoffer_p.h
index 09ca8765..dc1c84fe 100644
--- a/src/compositor/wayland_wrapper/qwldataoffer_p.h
+++ b/src/compositor/wayland_wrapper/qwldataoffer_p.h
@@ -65,10 +65,10 @@ public:
~DataOffer();
protected:
- void data_offer_accept(Resource *resource, uint32_t serial, const QString &mime_type) Q_DECL_OVERRIDE;
- void data_offer_receive(Resource *resource, const QString &mime_type, int32_t fd) Q_DECL_OVERRIDE;
- void data_offer_destroy(Resource *resource) Q_DECL_OVERRIDE;
- void data_offer_destroy_resource(Resource *resource) Q_DECL_OVERRIDE;
+ void data_offer_accept(Resource *resource, uint32_t serial, const QString &mime_type) override;
+ void data_offer_receive(Resource *resource, const QString &mime_type, int32_t fd) override;
+ void data_offer_destroy(Resource *resource) override;
+ void data_offer_destroy_resource(Resource *resource) override;
private:
QPointer<DataSource> m_dataSource;
diff --git a/src/compositor/wayland_wrapper/qwldatasource_p.h b/src/compositor/wayland_wrapper/qwldatasource_p.h
index 4389b40f..b548a241 100644
--- a/src/compositor/wayland_wrapper/qwldatasource_p.h
+++ b/src/compositor/wayland_wrapper/qwldatasource_p.h
@@ -78,9 +78,9 @@ public:
static DataSource *fromResource(struct ::wl_resource *resource);
protected:
- void data_source_offer(Resource *resource, const QString &mime_type) Q_DECL_OVERRIDE;
- void data_source_destroy(Resource *resource) Q_DECL_OVERRIDE;
- void data_source_destroy_resource(Resource *resource) Q_DECL_OVERRIDE;
+ void data_source_offer(Resource *resource, const QString &mime_type) override;
+ void data_source_destroy(Resource *resource) override;
+ void data_source_destroy_resource(Resource *resource) override;
private:
uint32_t m_time;
diff --git a/src/compositor/wayland_wrapper/qwlregion_p.h b/src/compositor/wayland_wrapper/qwlregion_p.h
index c63cdbc4..c5047596 100644
--- a/src/compositor/wayland_wrapper/qwlregion_p.h
+++ b/src/compositor/wayland_wrapper/qwlregion_p.h
@@ -76,11 +76,11 @@ private:
QRegion m_region;
- void region_destroy_resource(Resource *) Q_DECL_OVERRIDE;
+ void region_destroy_resource(Resource *) override;
- void region_destroy(Resource *resource) Q_DECL_OVERRIDE;
- void region_add(Resource *resource, int32_t x, int32_t y, int32_t w, int32_t h) Q_DECL_OVERRIDE;
- void region_subtract(Resource *resource, int32_t x, int32_t y, int32_t w, int32_t h) Q_DECL_OVERRIDE;
+ void region_destroy(Resource *resource) override;
+ void region_add(Resource *resource, int32_t x, int32_t y, int32_t w, int32_t h) override;
+ void region_subtract(Resource *resource, int32_t x, int32_t y, int32_t w, int32_t h) override;
};
}
diff --git a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.h b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.h
index 6f1e4d92..0a913bcd 100644
--- a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.h
+++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglintegration.h
@@ -66,13 +66,13 @@ public:
QWaylandBrcmEglIntegration();
~QWaylandBrcmEglIntegration();
- void initialize(QWaylandDisplay *waylandDisplay) Q_DECL_OVERRIDE;
+ void initialize(QWaylandDisplay *waylandDisplay) override;
- bool supportsThreadedOpenGL() const Q_DECL_OVERRIDE { return true; }
- bool supportsWindowDecoration() const Q_DECL_OVERRIDE { return false; }
+ bool supportsThreadedOpenGL() const override { return true; }
+ bool supportsWindowDecoration() const override { return false; }
QWaylandWindow *createEglWindow(QWindow *window);
- QPlatformOpenGLContext *createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const Q_DECL_OVERRIDE;
+ QPlatformOpenGLContext *createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const override;
EGLDisplay eglDisplay() const;
diff --git a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.h b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.h
index 5874fb60..be88df9a 100644
--- a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.h
+++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmeglwindow.h
@@ -60,10 +60,10 @@ class QWaylandBrcmEglWindow : public QWaylandWindow
public:
QWaylandBrcmEglWindow(QWindow *window);
~QWaylandBrcmEglWindow();
- WindowType windowType() const Q_DECL_OVERRIDE;
- void setGeometry(const QRect &rect) Q_DECL_OVERRIDE;
+ WindowType windowType() const override;
+ void setGeometry(const QRect &rect) override;
- QSurfaceFormat format() const Q_DECL_OVERRIDE;
+ QSurfaceFormat format() const override;
bool makeCurrent(EGLContext context);
void swapBuffers();
diff --git a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h
index a79cfcc6..ee8bc86f 100644
--- a/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h
+++ b/src/hardwareintegration/client/brcm-egl/qwaylandbrcmglcontext.h
@@ -58,14 +58,14 @@ public:
QWaylandBrcmGLContext(EGLDisplay eglDisplay, const QSurfaceFormat &format, QPlatformOpenGLContext *share);
~QWaylandBrcmGLContext();
- void swapBuffers(QPlatformSurface *surface) Q_DECL_OVERRIDE;
+ void swapBuffers(QPlatformSurface *surface) override;
- bool makeCurrent(QPlatformSurface *surface) Q_DECL_OVERRIDE;
- void doneCurrent() Q_DECL_OVERRIDE;
+ bool makeCurrent(QPlatformSurface *surface) override;
+ void doneCurrent() override;
- void (*getProcAddress(const char *procName)) () Q_DECL_OVERRIDE;
+ void (*getProcAddress(const char *procName)) () override;
- QSurfaceFormat format() const Q_DECL_OVERRIDE { return m_format; }
+ QSurfaceFormat format() const override { return m_format; }
EGLConfig eglConfig() const;
EGLContext eglContext() const { return m_context; }
diff --git a/src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.h b/src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.h
index e55eee54..f848f190 100644
--- a/src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.h
+++ b/src/hardwareintegration/client/drm-egl-server/drmeglserverbufferintegration.h
@@ -71,7 +71,7 @@ class DrmServerBuffer : public QWaylandServerBuffer
public:
DrmServerBuffer(DrmEglServerBufferIntegration *integration, int32_t name, int32_t width, int32_t height, int32_t stride, int32_t format);
~DrmServerBuffer();
- void bindTextureToBuffer() Q_DECL_OVERRIDE;
+ void bindTextureToBuffer() override;
private:
DrmEglServerBufferIntegration *m_integration;
EGLImageKHR m_image;
@@ -83,16 +83,16 @@ class DrmEglServerBufferIntegration
, public QtWayland::qt_drm_egl_server_buffer
{
public:
- void initialize(QWaylandDisplay *display) Q_DECL_OVERRIDE;
+ void initialize(QWaylandDisplay *display) override;
- virtual QWaylandServerBuffer *serverBuffer(struct qt_server_buffer *buffer) Q_DECL_OVERRIDE;
+ virtual QWaylandServerBuffer *serverBuffer(struct qt_server_buffer *buffer) override;
inline EGLImageKHR eglCreateImageKHR(EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
inline EGLBoolean eglDestroyImageKHR (EGLImageKHR image);
inline void glEGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image);
protected:
- void registry_global(uint32_t name, const QString &interface, uint32_t version) Q_DECL_OVERRIDE;
- void drm_egl_server_buffer_server_buffer_created(struct ::qt_server_buffer *id, int32_t name, int32_t width, int32_t height, int32_t stride, int32_t format) Q_DECL_OVERRIDE;
+ void registry_global(uint32_t name, const QString &interface, uint32_t version) override;
+ void drm_egl_server_buffer_server_buffer_created(struct ::qt_server_buffer *id, int32_t name, int32_t width, int32_t height, int32_t stride, int32_t format) override;
private:
PFNEGLCREATEIMAGEKHRPROC m_egl_create_image;
PFNEGLDESTROYIMAGEKHRPROC m_egl_destroy_image;
diff --git a/src/hardwareintegration/client/libhybris-egl-server/libhybriseglserverbufferintegration.h b/src/hardwareintegration/client/libhybris-egl-server/libhybriseglserverbufferintegration.h
index 5e5bade0..e9f0689a 100644
--- a/src/hardwareintegration/client/libhybris-egl-server/libhybriseglserverbufferintegration.h
+++ b/src/hardwareintegration/client/libhybris-egl-server/libhybriseglserverbufferintegration.h
@@ -75,10 +75,10 @@ class LibHybrisServerBuffer : public QWaylandServerBuffer, public QtWayland::qt_
public:
LibHybrisServerBuffer(LibHybrisEglServerBufferIntegration *integration, int32_t numFds, wl_array *ints, int32_t name, int32_t width, int32_t height, int32_t stride, int32_t format);
~LibHybrisServerBuffer();
- void bindTextureToBuffer() Q_DECL_OVERRIDE;
+ void bindTextureToBuffer() override;
protected:
- void libhybris_buffer_add_fd(int32_t fd) Q_DECL_OVERRIDE;
+ void libhybris_buffer_add_fd(int32_t fd) override;
private:
LibHybrisEglServerBufferIntegration *m_integration;
@@ -96,9 +96,9 @@ class LibHybrisEglServerBufferIntegration
, public QtWayland::qt_libhybris_egl_server_buffer
{
public:
- void initialize(QWaylandDisplay *display) Q_DECL_OVERRIDE;
+ void initialize(QWaylandDisplay *display) override;
- virtual QWaylandServerBuffer *serverBuffer(struct qt_server_buffer *buffer) Q_DECL_OVERRIDE;
+ virtual QWaylandServerBuffer *serverBuffer(struct qt_server_buffer *buffer) override;
inline EGLImageKHR eglCreateImageKHR(EGLContext ctx, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list);
inline EGLBoolean eglDestroyImageKHR (EGLImageKHR image);
@@ -106,9 +106,9 @@ public:
inline EGLBoolean eglHybrisCreateRemoteBuffer(EGLint width, EGLint height, EGLint usage, EGLint format, EGLint stride, int num_ints, int *ints, int num_fds, int *fds, EGLClientBuffer *buffer);
protected:
- void registry_global(uint32_t name, const QString &interface, uint32_t version) Q_DECL_OVERRIDE;
+ void registry_global(uint32_t name, const QString &interface, uint32_t version) override;
void libhybris_egl_server_buffer_server_buffer_created(struct ::qt_libhybris_buffer *id, struct ::qt_server_buffer *qid,
- int32_t numFds, wl_array *ints, int32_t name, int32_t width, int32_t height, int32_t stride, int32_t format) Q_DECL_OVERRIDE;
+ int32_t numFds, wl_array *ints, int32_t name, int32_t width, int32_t height, int32_t stride, int32_t format) override;
private:
PFNEGLCREATEIMAGEKHRPROC m_egl_create_image;
PFNEGLDESTROYIMAGEKHRPROC m_egl_destroy_image;
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.h b/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.h
index 2faa02ec..427a30d8 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.h
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglclientbufferintegration.h
@@ -58,16 +58,16 @@ public:
QWaylandEglClientBufferIntegration();
~QWaylandEglClientBufferIntegration();
- void initialize(QWaylandDisplay *display) Q_DECL_OVERRIDE;
- bool isValid() const Q_DECL_OVERRIDE;
- bool supportsThreadedOpenGL() const Q_DECL_OVERRIDE;
- bool supportsWindowDecoration() const Q_DECL_OVERRIDE;
+ void initialize(QWaylandDisplay *display) override;
+ bool isValid() const override;
+ bool supportsThreadedOpenGL() const override;
+ bool supportsWindowDecoration() const override;
- QWaylandWindow *createEglWindow(QWindow *window) Q_DECL_OVERRIDE;
- QPlatformOpenGLContext *createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const Q_DECL_OVERRIDE;
+ QWaylandWindow *createEglWindow(QWindow *window) override;
+ QPlatformOpenGLContext *createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const override;
- void *nativeResource(NativeResource resource) Q_DECL_OVERRIDE;
- void *nativeResourceForContext(NativeResource resource, QPlatformOpenGLContext *context) Q_DECL_OVERRIDE;
+ void *nativeResource(NativeResource resource) override;
+ void *nativeResourceForContext(NativeResource resource, QPlatformOpenGLContext *context) override;
EGLDisplay eglDisplay() const;
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h
index bf656689..e471a8f7 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.h
@@ -58,10 +58,10 @@ class QWaylandEglWindow : public QWaylandWindow
public:
QWaylandEglWindow(QWindow *window);
~QWaylandEglWindow();
- WindowType windowType() const Q_DECL_OVERRIDE;
+ WindowType windowType() const override;
void updateSurface(bool create);
- virtual void setGeometry(const QRect &rect) Q_DECL_OVERRIDE;
+ virtual void setGeometry(const QRect &rect) override;
QRect contentsRect() const;
EGLSurface eglSurface() const;
@@ -69,12 +69,12 @@ public:
GLuint contentTexture() const;
bool needToUpdateContentFBO() const { return decoration() && (m_resize || !m_contentFBO); }
- QSurfaceFormat format() const Q_DECL_OVERRIDE;
+ QSurfaceFormat format() const override;
void bindContentFBO();
- void invalidateSurface() Q_DECL_OVERRIDE;
- void setVisible(bool visible) Q_DECL_OVERRIDE;
+ void invalidateSurface() override;
+ void setVisible(bool visible) override;
private Q_SLOTS:
void doInvalidateSurface();
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.h b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.h
index d528b232..6d9887de 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.h
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.h
@@ -63,19 +63,19 @@ public:
QWaylandGLContext(EGLDisplay eglDisplay, QWaylandDisplay *display, const QSurfaceFormat &format, QPlatformOpenGLContext *share);
~QWaylandGLContext();
- void swapBuffers(QPlatformSurface *surface) Q_DECL_OVERRIDE;
+ void swapBuffers(QPlatformSurface *surface) override;
- bool makeCurrent(QPlatformSurface *surface) Q_DECL_OVERRIDE;
- void doneCurrent() Q_DECL_OVERRIDE;
+ bool makeCurrent(QPlatformSurface *surface) override;
+ void doneCurrent() override;
- GLuint defaultFramebufferObject(QPlatformSurface *surface) const Q_DECL_OVERRIDE;
+ GLuint defaultFramebufferObject(QPlatformSurface *surface) const override;
- bool isSharing() const Q_DECL_OVERRIDE;
- bool isValid() const Q_DECL_OVERRIDE;
+ bool isSharing() const override;
+ bool isValid() const override;
- QFunctionPointer getProcAddress(const char *procName) Q_DECL_OVERRIDE;
+ QFunctionPointer getProcAddress(const char *procName) override;
- QSurfaceFormat format() const Q_DECL_OVERRIDE { return m_format; }
+ QSurfaceFormat format() const override { return m_format; }
EGLConfig eglConfig() const;
EGLContext eglContext() const { return m_context; }
diff --git a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.h b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.h
index 612421be..cdc071e5 100644
--- a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.h
+++ b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglclientbufferintegration.h
@@ -75,10 +75,10 @@ public:
QWaylandXCompositeEGLClientBufferIntegration();
~QWaylandXCompositeEGLClientBufferIntegration();
- void initialize(QWaylandDisplay *dispaly) Q_DECL_OVERRIDE;
+ void initialize(QWaylandDisplay *dispaly) override;
- QWaylandWindow *createEglWindow(QWindow *window) Q_DECL_OVERRIDE;
- QPlatformOpenGLContext *createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const Q_DECL_OVERRIDE;
+ QWaylandWindow *createEglWindow(QWindow *window) override;
+ QPlatformOpenGLContext *createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const override;
QWaylandDisplay *waylandDisplay() const;
struct qt_xcomposite *waylandXComposite() const;
@@ -88,8 +88,8 @@ public:
int screen() const;
Window rootWindow() const;
- bool supportsThreadedOpenGL() const Q_DECL_OVERRIDE { return true; }
- bool supportsWindowDecoration() const Q_DECL_OVERRIDE { return false; }
+ bool supportsThreadedOpenGL() const override { return true; }
+ bool supportsWindowDecoration() const override { return false; }
private:
QWaylandDisplay *mWaylandDisplay;
diff --git a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.h b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.h
index 83a64375..e0b70bf2 100644
--- a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.h
+++ b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglcontext.h
@@ -57,10 +57,10 @@ class QWaylandXCompositeEGLContext : public QEGLPlatformContext
public:
QWaylandXCompositeEGLContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display, EGLConfig config);
- void swapBuffers(QPlatformSurface *surface) Q_DECL_OVERRIDE;
+ void swapBuffers(QPlatformSurface *surface) override;
private:
- EGLSurface eglSurfaceForPlatformSurface(QPlatformSurface *surface) Q_DECL_OVERRIDE;
+ EGLSurface eglSurfaceForPlatformSurface(QPlatformSurface *surface) override;
};
}
diff --git a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.h b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.h
index 1203c7ee..5b7d492c 100644
--- a/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.h
+++ b/src/hardwareintegration/client/xcomposite-egl/qwaylandxcompositeeglwindow.h
@@ -54,9 +54,9 @@ class QWaylandXCompositeEGLWindow : public QWaylandWindow
{
public:
QWaylandXCompositeEGLWindow(QWindow *window, QWaylandXCompositeEGLClientBufferIntegration *glxIntegration);
- WindowType windowType() const Q_DECL_OVERRIDE;
+ WindowType windowType() const override;
- void setGeometry(const QRect &rect) Q_DECL_OVERRIDE;
+ void setGeometry(const QRect &rect) override;
EGLSurface eglSurface() const;
diff --git a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.h b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.h
index 5847ea97..d95f57be 100644
--- a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.h
+++ b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxcontext.h
@@ -57,14 +57,14 @@ class QWaylandXCompositeGLXContext : public QPlatformOpenGLContext
public:
QWaylandXCompositeGLXContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, Display *display, int screen);
- QSurfaceFormat format() const Q_DECL_OVERRIDE;
+ QSurfaceFormat format() const override;
- void swapBuffers(QPlatformSurface *surface) Q_DECL_OVERRIDE;
+ void swapBuffers(QPlatformSurface *surface) override;
- bool makeCurrent(QPlatformSurface *surface) Q_DECL_OVERRIDE;
- void doneCurrent() Q_DECL_OVERRIDE;
+ bool makeCurrent(QPlatformSurface *surface) override;
+ void doneCurrent() override;
- QFunctionPointer getProcAddress(const char *procName) Q_DECL_OVERRIDE;
+ QFunctionPointer getProcAddress(const char *procName) override;
private:
GLXContext m_context;
diff --git a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.h b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.h
index bd8fe410..288bf311 100644
--- a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.h
+++ b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxintegration.h
@@ -70,10 +70,10 @@ public:
QWaylandXCompositeGLXIntegration();
~QWaylandXCompositeGLXIntegration();
- void initialize(QWaylandDisplay *display) Q_DECL_OVERRIDE;
+ void initialize(QWaylandDisplay *display) override;
- QWaylandWindow *createEglWindow(QWindow *window) Q_DECL_OVERRIDE;
- QPlatformOpenGLContext *createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const Q_DECL_OVERRIDE;
+ QWaylandWindow *createEglWindow(QWindow *window) override;
+ QPlatformOpenGLContext *createPlatformOpenGLContext(const QSurfaceFormat &glFormat, QPlatformOpenGLContext *share) const override;
QWaylandDisplay *waylandDisplay() const;
struct qt_xcomposite *waylandXComposite() const;
@@ -82,8 +82,8 @@ public:
int screen() const;
Window rootWindow() const;
- bool supportsThreadedOpenGL() const Q_DECL_OVERRIDE { return false; }
- bool supportsWindowDecoration() const Q_DECL_OVERRIDE { return false; }
+ bool supportsThreadedOpenGL() const override { return false; }
+ bool supportsWindowDecoration() const override { return false; }
private:
QWaylandDisplay *mWaylandDisplay;
diff --git a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.h b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.h
index 7318044f..aeb5c14e 100644
--- a/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.h
+++ b/src/hardwareintegration/client/xcomposite-glx/qwaylandxcompositeglxwindow.h
@@ -56,9 +56,9 @@ class QWaylandXCompositeGLXWindow : public QWaylandWindow
{
public:
QWaylandXCompositeGLXWindow(QWindow *window, QWaylandXCompositeGLXIntegration *glxIntegration);
- WindowType windowType() const Q_DECL_OVERRIDE;
+ WindowType windowType() const override;
- void setGeometry(const QRect &rect) Q_DECL_OVERRIDE;
+ void setGeometry(const QRect &rect) override;
Window xWindow() const;
diff --git a/src/hardwareintegration/compositor/brcm-egl/brcmbuffer.h b/src/hardwareintegration/compositor/brcm-egl/brcmbuffer.h
index ef6f613b..479e05c1 100644
--- a/src/hardwareintegration/compositor/brcm-egl/brcmbuffer.h
+++ b/src/hardwareintegration/compositor/brcm-egl/brcmbuffer.h
@@ -62,8 +62,8 @@ public:
static BrcmBuffer *fromResource(struct ::wl_resource *resource) { return static_cast<BrcmBuffer*>(Resource::fromResource(resource)->buffer_object); }
protected:
- void buffer_destroy_resource(Resource *resource) Q_DECL_OVERRIDE;
- void buffer_destroy(Resource *resource) Q_DECL_OVERRIDE;
+ void buffer_destroy_resource(Resource *resource) override;
+ void buffer_destroy(Resource *resource) override;
private:
QVector<EGLint> m_handle;
diff --git a/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.h b/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.h
index a1d39e4f..402f51b9 100644
--- a/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.h
+++ b/src/hardwareintegration/compositor/brcm-egl/brcmeglintegration.h
@@ -54,12 +54,12 @@ class BrcmEglIntegration : public QtWayland::ClientBufferIntegration, public QtW
public:
BrcmEglIntegration();
- void initializeHardware(struct ::wl_display *display) Q_DECL_OVERRIDE;
- QtWayland::ClientBuffer *createBufferFor(wl_resource *buffer) Q_DECL_OVERRIDE;
+ void initializeHardware(struct ::wl_display *display) override;
+ QtWayland::ClientBuffer *createBufferFor(wl_resource *buffer) override;
protected:
- void brcm_bind_resource(Resource *resource) Q_DECL_OVERRIDE;
- void brcm_create_buffer(Resource *resource, uint32_t id, int32_t width, int32_t height, wl_array *data) Q_DECL_OVERRIDE;
+ void brcm_bind_resource(Resource *resource) override;
+ void brcm_create_buffer(Resource *resource, uint32_t id, int32_t width, int32_t height, wl_array *data) override;
private:
Q_DISABLE_COPY(BrcmEglIntegration)
@@ -71,10 +71,10 @@ class BrcmEglClientBuffer : public QtWayland::ClientBuffer
public:
BrcmEglClientBuffer(BrcmEglIntegration *integration, wl_resource *buffer);
- QWaylandBufferRef::BufferFormatEgl bufferFormatEgl() const Q_DECL_OVERRIDE;
- QSize size() const Q_DECL_OVERRIDE;
- QWaylandSurface::Origin origin() const Q_DECL_OVERRIDE;
- QOpenGLTexture *toOpenGlTexture(int plane) Q_DECL_OVERRIDE;
+ QWaylandBufferRef::BufferFormatEgl bufferFormatEgl() const override;
+ QSize size() const override;
+ QWaylandSurface::Origin origin() const override;
+ QOpenGLTexture *toOpenGlTexture(int plane) override;
private:
BrcmEglIntegration *m_integration;
QOpenGLTexture *m_texture;
diff --git a/src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.h b/src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.h
index 5cd7bcf5..d9072b06 100644
--- a/src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.h
+++ b/src/hardwareintegration/compositor/drm-egl-server/drmeglserverbufferintegration.h
@@ -75,8 +75,8 @@ class DrmEglServerBuffer : public QtWayland::ServerBuffer, public QtWaylandServe
public:
DrmEglServerBuffer(DrmEglServerBufferIntegration *integration, const QSize &size, QtWayland::ServerBuffer::Format format);
- struct ::wl_resource *resourceForClient(struct ::wl_client *) Q_DECL_OVERRIDE;
- void bindTextureToBuffer() Q_DECL_OVERRIDE;
+ struct ::wl_resource *resourceForClient(struct ::wl_client *) override;
+ void bindTextureToBuffer() override;
private:
DrmEglServerBufferIntegration *m_integration;
@@ -98,8 +98,8 @@ public:
void initializeHardware(QWaylandCompositor *);
- bool supportsFormat(QtWayland::ServerBuffer::Format format) const Q_DECL_OVERRIDE;
- QtWayland::ServerBuffer *createServerBuffer(const QSize &size, QtWayland::ServerBuffer::Format format) Q_DECL_OVERRIDE;
+ bool supportsFormat(QtWayland::ServerBuffer::Format format) const override;
+ QtWayland::ServerBuffer *createServerBuffer(const QSize &size, QtWayland::ServerBuffer::Format format) override;
EGLDisplay display() const { return m_egl_display; }
diff --git a/src/hardwareintegration/compositor/libhybris-egl-server/libhybriseglserverbufferintegration.h b/src/hardwareintegration/compositor/libhybris-egl-server/libhybriseglserverbufferintegration.h
index 572c681b..130654d6 100644
--- a/src/hardwareintegration/compositor/libhybris-egl-server/libhybriseglserverbufferintegration.h
+++ b/src/hardwareintegration/compositor/libhybris-egl-server/libhybriseglserverbufferintegration.h
@@ -77,8 +77,8 @@ class LibHybrisEglServerBuffer : public QtWayland::ServerBuffer, public QtWaylan
public:
LibHybrisEglServerBuffer(LibHybrisEglServerBufferIntegration *integration, const QSize &size, QtWayland::ServerBuffer::Format format);
- struct ::wl_resource *resourceForClient(struct ::wl_client *) Q_DECL_OVERRIDE;
- void bindTextureToBuffer() Q_DECL_OVERRIDE;
+ struct ::wl_resource *resourceForClient(struct ::wl_client *) override;
+ void bindTextureToBuffer() override;
private:
LibHybrisEglServerBufferIntegration *m_integration;
@@ -104,8 +104,8 @@ public:
void initializeHardware(QWaylandCompositor *);
- bool supportsFormat(QtWayland::ServerBuffer::Format format) const Q_DECL_OVERRIDE;
- QtWayland::ServerBuffer *createServerBuffer(const QSize &size, QtWayland::ServerBuffer::Format format) Q_DECL_OVERRIDE;
+ bool supportsFormat(QtWayland::ServerBuffer::Format format) const override;
+ QtWayland::ServerBuffer *createServerBuffer(const QSize &size, QtWayland::ServerBuffer::Format format) override;
EGLDisplay display() const { return m_egl_display; }
diff --git a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
index 8b87db97..1e6723a0 100644
--- a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
+++ b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp
@@ -298,8 +298,10 @@ void WaylandEglClientBufferIntegrationPrivate::init_egl_fd_texture(WaylandEglCli
}
state.eglMode = BufferState::ModeEGLStream;
- if (!QOpenGLContext::currentContext())
+ if (!QOpenGLContext::currentContext()) {
qWarning("EglClientBufferIntegration: creating texture with no current context");
+ return;
+ }
//TODO This texture might end up in a different context than the quick item which wants to use it, this needs to be fixed somehow.
diff --git a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h
index c93ce1dd..e0235d84 100644
--- a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h
+++ b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.h
@@ -51,7 +51,7 @@ class WaylandEglClientBufferIntegration : public QtWayland::ClientBufferIntegrat
public:
WaylandEglClientBufferIntegration();
- void initializeHardware(struct ::wl_display *display) Q_DECL_OVERRIDE;
+ void initializeHardware(struct ::wl_display *display) override;
QtWayland::ClientBuffer *createBufferFor(wl_resource *buffer);
@@ -65,13 +65,13 @@ struct BufferState;
class WaylandEglClientBuffer : public QtWayland::ClientBuffer
{
public:
- QWaylandBufferRef::BufferFormatEgl bufferFormatEgl() const Q_DECL_OVERRIDE;
- QSize size() const Q_DECL_OVERRIDE;
- QWaylandSurface::Origin origin() const Q_DECL_OVERRIDE;
- quintptr lockNativeBuffer() Q_DECL_OVERRIDE;
- void unlockNativeBuffer(quintptr native_buffer) const Q_DECL_OVERRIDE;
- QOpenGLTexture *toOpenGlTexture(int plane) Q_DECL_OVERRIDE;
- void setCommitted(QRegion &damage) Q_DECL_OVERRIDE;
+ QWaylandBufferRef::BufferFormatEgl bufferFormatEgl() const override;
+ QSize size() const override;
+ QWaylandSurface::Origin origin() const override;
+ quintptr lockNativeBuffer() override;
+ void unlockNativeBuffer(quintptr native_buffer) const override;
+ QOpenGLTexture *toOpenGlTexture(int plane) override;
+ void setCommitted(QRegion &damage) override;
private:
friend class WaylandEglClientBufferIntegration;
diff --git a/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.h b/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.h
index ec4ea284..fb869b2e 100644
--- a/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.h
+++ b/src/hardwareintegration/compositor/xcomposite-egl/xcompositeeglintegration.h
@@ -52,8 +52,8 @@ class XCompositeEglClientBufferIntegration : public QtWayland::ClientBufferInteg
public:
XCompositeEglClientBufferIntegration();
- void initializeHardware(struct ::wl_display *display) Q_DECL_OVERRIDE;
- QtWayland::ClientBuffer *createBufferFor(wl_resource *buffer) Q_DECL_OVERRIDE;
+ void initializeHardware(struct ::wl_display *display) override;
+ QtWayland::ClientBuffer *createBufferFor(wl_resource *buffer) override;
inline Display *xDisplay() const { return mDisplay; }
inline EGLDisplay eglDisplay() const { return mEglDisplay; }
@@ -69,8 +69,8 @@ public:
QSize size() const;
QWaylandSurface::Origin origin() const;
- QOpenGLTexture *toOpenGlTexture(int plane) Q_DECL_OVERRIDE;
- QWaylandBufferRef::BufferFormatEgl bufferFormatEgl() const Q_DECL_OVERRIDE {
+ QOpenGLTexture *toOpenGlTexture(int plane) override;
+ QWaylandBufferRef::BufferFormatEgl bufferFormatEgl() const override {
return QWaylandBufferRef::BufferFormatEgl_RGBA;
}
diff --git a/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.h b/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.h
index 7b63f976..2776ad35 100644
--- a/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.h
+++ b/src/hardwareintegration/compositor/xcomposite-glx/xcompositeglxintegration.h
@@ -55,8 +55,8 @@ public:
XCompositeGLXClientBufferIntegration();
~XCompositeGLXClientBufferIntegration();
- void initializeHardware(struct ::wl_display *display) Q_DECL_OVERRIDE;
- QtWayland::ClientBuffer *createBufferFor(wl_resource *buffer) Q_DECL_OVERRIDE;
+ void initializeHardware(struct ::wl_display *display) override;
+ QtWayland::ClientBuffer *createBufferFor(wl_resource *buffer) override;
inline Display *xDisplay() const { return mDisplay; }
inline int xScreen() const { return mScreen; }
@@ -77,8 +77,8 @@ public:
QSize size() const;
QWaylandSurface::Origin origin() const;
- QOpenGLTexture *toOpenGlTexture(int plane) Q_DECL_OVERRIDE;
- QWaylandBufferRef::BufferFormatEgl bufferFormatEgl() const Q_DECL_OVERRIDE {
+ QOpenGLTexture *toOpenGlTexture(int plane) override;
+ QWaylandBufferRef::BufferFormatEgl bufferFormatEgl() const override {
return QWaylandBufferRef::BufferFormatEgl_RGBA;
}
diff --git a/src/hardwareintegration/compositor/xcomposite_share/xcompositebuffer.h b/src/hardwareintegration/compositor/xcomposite_share/xcompositebuffer.h
index 318b1787..6f17f7e3 100644
--- a/src/hardwareintegration/compositor/xcomposite_share/xcompositebuffer.h
+++ b/src/hardwareintegration/compositor/xcomposite_share/xcompositebuffer.h
@@ -68,8 +68,8 @@ public:
static XCompositeBuffer *fromResource(struct ::wl_resource *resource) { return static_cast<XCompositeBuffer*>(Resource::fromResource(resource)->buffer_object); }
protected:
- void buffer_destroy_resource(Resource *) Q_DECL_OVERRIDE;
- void buffer_destroy(Resource *) Q_DECL_OVERRIDE;
+ void buffer_destroy_resource(Resource *) override;
+ void buffer_destroy(Resource *) override;
private:
Window mWindow;
diff --git a/src/hardwareintegration/compositor/xcomposite_share/xcompositehandler.h b/src/hardwareintegration/compositor/xcomposite_share/xcompositehandler.h
index 482224b6..b2a61206 100644
--- a/src/hardwareintegration/compositor/xcomposite_share/xcompositehandler.h
+++ b/src/hardwareintegration/compositor/xcomposite_share/xcompositehandler.h
@@ -56,9 +56,9 @@ private:
QString mDisplayString;
- void xcomposite_bind_resource(Resource *resource) Q_DECL_OVERRIDE;
+ void xcomposite_bind_resource(Resource *resource) override;
void xcomposite_create_buffer(Resource *resource, uint32_t id, uint32_t x_window,
- int32_t width, int32_t height) Q_DECL_OVERRIDE;
+ int32_t width, int32_t height) override;
};
diff --git a/src/imports/compositor/qwaylandmousetracker.cpp b/src/imports/compositor/qwaylandmousetracker.cpp
index 489dc7b5..4fcebe1d 100644
--- a/src/imports/compositor/qwaylandmousetracker.cpp
+++ b/src/imports/compositor/qwaylandmousetracker.cpp
@@ -88,7 +88,9 @@ QWaylandMouseTracker::QWaylandMouseTracker(QQuickItem *parent)
setFiltersChildMouseEvents(true);
setAcceptHoverEvents(true);
setAcceptedMouseButtons(Qt::AllButtons);
+#if QT_CONFIG(cursor)
setCursor(QCursor(d->cursorPixmap));
+#endif
}
qreal QWaylandMouseTracker::mouseX() const
@@ -102,6 +104,7 @@ qreal QWaylandMouseTracker::mouseY() const
return d->mousePos.y();
}
+#if QT_CONFIG(cursor)
void QWaylandMouseTracker::setWindowSystemCursorEnabled(bool enable)
{
Q_D(QWaylandMouseTracker);
@@ -121,6 +124,7 @@ bool QWaylandMouseTracker::windowSystemCursorEnabled() const
Q_D(const QWaylandMouseTracker);
return d->windowSystemCursorEnabled;
}
+#endif
bool QWaylandMouseTracker::hovered() const
{
diff --git a/src/imports/compositor/qwaylandmousetracker_p.h b/src/imports/compositor/qwaylandmousetracker_p.h
index 45c80208..9132457a 100644
--- a/src/imports/compositor/qwaylandmousetracker_p.h
+++ b/src/imports/compositor/qwaylandmousetracker_p.h
@@ -71,11 +71,11 @@ signals:
void hoveredChanged();
protected:
- bool childMouseEventFilter(QQuickItem *item, QEvent *event) Q_DECL_OVERRIDE;
- void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
- void hoverMoveEvent(QHoverEvent *event) Q_DECL_OVERRIDE;
- void hoverEnterEvent(QHoverEvent *event) Q_DECL_OVERRIDE;
- void hoverLeaveEvent(QHoverEvent *event) Q_DECL_OVERRIDE;
+ bool childMouseEventFilter(QQuickItem *item, QEvent *event) override;
+ void mouseMoveEvent(QMouseEvent *event) override;
+ void hoverMoveEvent(QHoverEvent *event) override;
+ void hoverEnterEvent(QHoverEvent *event) override;
+ void hoverLeaveEvent(QHoverEvent *event) override;
};
QT_END_NAMESPACE
diff --git a/src/imports/compositor/qwaylandquickcompositorplugin.cpp b/src/imports/compositor/qwaylandquickcompositorplugin.cpp
index 0caa4a35..4444c953 100644
--- a/src/imports/compositor/qwaylandquickcompositorplugin.cpp
+++ b/src/imports/compositor/qwaylandquickcompositorplugin.cpp
@@ -141,6 +141,7 @@ public:
qmlRegisterType<QWaylandWlShellQuickExtension>(uri, 1, 0, "WlShell");
qmlRegisterType<QWaylandWlShellSurface>(uri, 1, 0, "WlShellSurface");
qmlRegisterType<QWaylandQuickShellSurfaceItem>(uri, 1, 0, "ShellSurfaceItem");
+ qmlRegisterUncreatableType<QWaylandXdgShellV5>(uri, 1, 0, "XdgShellV5Base", QObject::tr("Cannot create instance of XdgShellV5Base"));
qmlRegisterType<QWaylandXdgShellV5QuickExtension>(uri, 1, 0, "XdgShellV5");
qmlRegisterType<QWaylandXdgSurfaceV5>(uri, 1, 0, "XdgSurfaceV5");
qmlRegisterType<QWaylandTextInputManagerQuickExtension>(uri, 1, 0, "TextInputManager");
diff --git a/src/plugins/decorations/bradient/bradient.pro b/src/plugins/decorations/bradient/bradient.pro
index 843149e0..e3157678 100644
--- a/src/plugins/decorations/bradient/bradient.pro
+++ b/src/plugins/decorations/bradient/bradient.pro
@@ -8,4 +8,5 @@ SOURCES += main.cpp
QMAKE_USE += wayland-client
PLUGIN_TYPE = wayland-decoration-client
+PLUGIN_CLASS_NAME = QWaylandBradientDecorationPlugin
load(qt_plugin)
diff --git a/src/plugins/decorations/bradient/main.cpp b/src/plugins/decorations/bradient/main.cpp
index f57b816e..074c7452 100644
--- a/src/plugins/decorations/bradient/main.cpp
+++ b/src/plugins/decorations/bradient/main.cpp
@@ -135,10 +135,10 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandBradientDecoration : public QWaylandAbstra
public:
QWaylandBradientDecoration();
protected:
- QMargins margins() const Q_DECL_OVERRIDE;
- void paint(QPaintDevice *device) Q_DECL_OVERRIDE;
- bool handleMouse(QWaylandInputDevice *inputDevice, const QPointF &local, const QPointF &global,Qt::MouseButtons b,Qt::KeyboardModifiers mods) Q_DECL_OVERRIDE;
- bool handleTouch(QWaylandInputDevice *inputDevice, const QPointF &local, const QPointF &global, Qt::TouchPointState state, Qt::KeyboardModifiers mods) Q_DECL_OVERRIDE;
+ QMargins margins() const override;
+ void paint(QPaintDevice *device) override;
+ bool handleMouse(QWaylandInputDevice *inputDevice, const QPointF &local, const QPointF &global,Qt::MouseButtons b,Qt::KeyboardModifiers mods) override;
+ bool handleTouch(QWaylandInputDevice *inputDevice, const QPointF &local, const QPointF &global, Qt::TouchPointState state, Qt::KeyboardModifiers mods) override;
private:
void processMouseTop(QWaylandInputDevice *inputDevice, const QPointF &local, Qt::MouseButtons b,Qt::KeyboardModifiers mods);
void processMouseBottom(QWaylandInputDevice *inputDevice, const QPointF &local, Qt::MouseButtons b,Qt::KeyboardModifiers mods);
@@ -372,7 +372,9 @@ bool QWaylandBradientDecoration::handleMouse(QWaylandInputDevice *inputDevice, c
} else if (local.x() > window()->width() + margins().left()) {
processMouseRight(inputDevice,local,b,mods);
} else {
+#if QT_CONFIG(cursor)
waylandWindow()->restoreMouseCursor(inputDevice);
+#endif
setMouseButtons(b);
return false;
}
@@ -409,19 +411,27 @@ void QWaylandBradientDecoration::processMouseTop(QWaylandInputDevice *inputDevic
if (local.y() <= margins().bottom()) {
if (local.x() <= margins().left()) {
//top left bit
+#if QT_CONFIG(cursor)
waylandWindow()->setMouseCursor(inputDevice, Qt::SizeFDiagCursor);
+#endif
startResize(inputDevice,WL_SHELL_SURFACE_RESIZE_TOP_LEFT,b);
} else if (local.x() > window()->width() + margins().left()) {
//top right bit
+#if QT_CONFIG(cursor)
waylandWindow()->setMouseCursor(inputDevice, Qt::SizeBDiagCursor);
+#endif
startResize(inputDevice,WL_SHELL_SURFACE_RESIZE_TOP_RIGHT,b);
} else {
//top reszie bit
+#if QT_CONFIG(cursor)
waylandWindow()->setMouseCursor(inputDevice, Qt::SplitVCursor);
+#endif
startResize(inputDevice,WL_SHELL_SURFACE_RESIZE_TOP,b);
}
} else {
+#if QT_CONFIG(cursor)
waylandWindow()->restoreMouseCursor(inputDevice);
+#endif
startMove(inputDevice,b);
}
@@ -432,15 +442,21 @@ void QWaylandBradientDecoration::processMouseBottom(QWaylandInputDevice *inputDe
Q_UNUSED(mods);
if (local.x() <= margins().left()) {
//bottom left bit
+#if QT_CONFIG(cursor)
waylandWindow()->setMouseCursor(inputDevice, Qt::SizeBDiagCursor);
+#endif
startResize(inputDevice, WL_SHELL_SURFACE_RESIZE_BOTTOM_LEFT,b);
} else if (local.x() > window()->width() + margins().left()) {
//bottom right bit
+#if QT_CONFIG(cursor)
waylandWindow()->setMouseCursor(inputDevice, Qt::SizeFDiagCursor);
+#endif
startResize(inputDevice, WL_SHELL_SURFACE_RESIZE_BOTTOM_RIGHT,b);
} else {
//bottom bit
+#if QT_CONFIG(cursor)
waylandWindow()->setMouseCursor(inputDevice, Qt::SplitVCursor);
+#endif
startResize(inputDevice,WL_SHELL_SURFACE_RESIZE_BOTTOM,b);
}
}
@@ -449,7 +465,9 @@ void QWaylandBradientDecoration::processMouseLeft(QWaylandInputDevice *inputDevi
{
Q_UNUSED(local);
Q_UNUSED(mods);
+#if QT_CONFIG(cursor)
waylandWindow()->setMouseCursor(inputDevice, Qt::SplitHCursor);
+#endif
startResize(inputDevice,WL_SHELL_SURFACE_RESIZE_LEFT,b);
}
@@ -457,7 +475,9 @@ void QWaylandBradientDecoration::processMouseRight(QWaylandInputDevice *inputDev
{
Q_UNUSED(local);
Q_UNUSED(mods);
+#if QT_CONFIG(cursor)
waylandWindow()->setMouseCursor(inputDevice, Qt::SplitHCursor);
+#endif
startResize(inputDevice, WL_SHELL_SURFACE_RESIZE_RIGHT,b);
}
@@ -466,7 +486,7 @@ class QWaylandBradientDecorationPlugin : public QWaylandDecorationPlugin
Q_OBJECT
Q_PLUGIN_METADATA(IID QWaylandDecorationFactoryInterface_iid FILE "bradient.json")
public:
- QWaylandAbstractDecoration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
+ QWaylandAbstractDecoration *create(const QString&, const QStringList&) override;
};
QWaylandAbstractDecoration *QWaylandBradientDecorationPlugin::create(const QString& system, const QStringList& paramList)
diff --git a/src/plugins/hardwareintegration/client/brcm-egl/brcm-egl.pro b/src/plugins/hardwareintegration/client/brcm-egl/brcm-egl.pro
index 550343cf..c2e9ad4f 100644
--- a/src/plugins/hardwareintegration/client/brcm-egl/brcm-egl.pro
+++ b/src/plugins/hardwareintegration/client/brcm-egl/brcm-egl.pro
@@ -8,4 +8,5 @@ OTHER_FILES += \
SOURCES += main.cpp
PLUGIN_TYPE = wayland-graphics-integration-client
+PLUGIN_CLASS_NAME = QWaylandBrcmEglClientBufferPlugin
load(qt_plugin)
diff --git a/src/plugins/hardwareintegration/client/brcm-egl/main.cpp b/src/plugins/hardwareintegration/client/brcm-egl/main.cpp
index ea66995d..4f5a2ae3 100644
--- a/src/plugins/hardwareintegration/client/brcm-egl/main.cpp
+++ b/src/plugins/hardwareintegration/client/brcm-egl/main.cpp
@@ -49,7 +49,7 @@ class QWaylandBrcmEglClientBufferPlugin : public QWaylandClientBufferIntegration
Q_OBJECT
Q_PLUGIN_METADATA(IID QWaylandClientBufferIntegrationFactoryInterface_iid FILE "brcm-egl.json")
public:
- QWaylandClientBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
+ QWaylandClientBufferIntegration *create(const QString&, const QStringList&) override;
};
QWaylandClientBufferIntegration *QWaylandBrcmEglClientBufferPlugin::create(const QString& system, const QStringList& paramList)
diff --git a/src/plugins/hardwareintegration/client/drm-egl-server/drm-egl-server.pro b/src/plugins/hardwareintegration/client/drm-egl-server/drm-egl-server.pro
index 29a48c9e..2fba5bd1 100644
--- a/src/plugins/hardwareintegration/client/drm-egl-server/drm-egl-server.pro
+++ b/src/plugins/hardwareintegration/client/drm-egl-server/drm-egl-server.pro
@@ -11,4 +11,5 @@ OTHER_FILES += \
SOURCES += main.cpp
PLUGIN_TYPE = wayland-graphics-integration-client
+PLUGIN_CLASS_NAME = DrmEglServerBufferPlugin
load(qt_plugin)
diff --git a/src/plugins/hardwareintegration/client/drm-egl-server/main.cpp b/src/plugins/hardwareintegration/client/drm-egl-server/main.cpp
index 9149d588..70c9e300 100644
--- a/src/plugins/hardwareintegration/client/drm-egl-server/main.cpp
+++ b/src/plugins/hardwareintegration/client/drm-egl-server/main.cpp
@@ -49,7 +49,7 @@ class DrmEglServerBufferPlugin : public QWaylandServerBufferIntegrationPlugin
Q_OBJECT
Q_PLUGIN_METADATA(IID QWaylandServerBufferIntegrationFactoryInterface_iid FILE "drm-egl-server.json")
public:
- QWaylandServerBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
+ QWaylandServerBufferIntegration *create(const QString&, const QStringList&) override;
};
QWaylandServerBufferIntegration *DrmEglServerBufferPlugin::create(const QString& system, const QStringList& paramList)
diff --git a/src/plugins/hardwareintegration/client/libhybris-egl-server/libhybris-egl-server.pro b/src/plugins/hardwareintegration/client/libhybris-egl-server/libhybris-egl-server.pro
index d7bf0370..3193b8f6 100644
--- a/src/plugins/hardwareintegration/client/libhybris-egl-server/libhybris-egl-server.pro
+++ b/src/plugins/hardwareintegration/client/libhybris-egl-server/libhybris-egl-server.pro
@@ -8,4 +8,5 @@ OTHER_FILES += \
SOURCES += main.cpp
PLUGIN_TYPE = wayland-graphics-integration-client
+PLUGIN_CLASS_NAME = LibHybrisEglServerBufferPlugin
load(qt_plugin)
diff --git a/src/plugins/hardwareintegration/client/libhybris-egl-server/main.cpp b/src/plugins/hardwareintegration/client/libhybris-egl-server/main.cpp
index f7ae0cdf..417597c3 100644
--- a/src/plugins/hardwareintegration/client/libhybris-egl-server/main.cpp
+++ b/src/plugins/hardwareintegration/client/libhybris-egl-server/main.cpp
@@ -49,7 +49,7 @@ class LibHybrisEglServerBufferPlugin : public QWaylandServerBufferIntegrationPlu
Q_OBJECT
Q_PLUGIN_METADATA(IID QWaylandServerBufferIntegrationFactoryInterface_iid FILE "libhybris-egl-server.json")
public:
- QWaylandServerBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
+ QWaylandServerBufferIntegration *create(const QString&, const QStringList&) override;
};
QWaylandServerBufferIntegration *LibHybrisEglServerBufferPlugin::create(const QString& system, const QStringList& paramList)
diff --git a/src/plugins/hardwareintegration/client/wayland-egl/main.cpp b/src/plugins/hardwareintegration/client/wayland-egl/main.cpp
index 364e18af..05053ff9 100644
--- a/src/plugins/hardwareintegration/client/wayland-egl/main.cpp
+++ b/src/plugins/hardwareintegration/client/wayland-egl/main.cpp
@@ -49,7 +49,7 @@ class QWaylandEglClientBufferPlugin : public QWaylandClientBufferIntegrationPlug
Q_OBJECT
Q_PLUGIN_METADATA(IID QWaylandClientBufferIntegrationFactoryInterface_iid FILE "wayland-egl.json")
public:
- QWaylandClientBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
+ QWaylandClientBufferIntegration *create(const QString&, const QStringList&) override;
};
QWaylandClientBufferIntegration *QWaylandEglClientBufferPlugin::create(const QString& system, const QStringList& paramList)
diff --git a/src/plugins/hardwareintegration/client/wayland-egl/wayland-egl.pro b/src/plugins/hardwareintegration/client/wayland-egl/wayland-egl.pro
index 076b6af2..d85c5efa 100644
--- a/src/plugins/hardwareintegration/client/wayland-egl/wayland-egl.pro
+++ b/src/plugins/hardwareintegration/client/wayland-egl/wayland-egl.pro
@@ -8,4 +8,5 @@ OTHER_FILES += \
SOURCES += main.cpp
PLUGIN_TYPE = wayland-graphics-integration-client
+PLUGIN_CLASS_NAME = QWaylandEglClientBufferPlugin
load(qt_plugin)
diff --git a/src/plugins/hardwareintegration/client/xcomposite-egl/main.cpp b/src/plugins/hardwareintegration/client/xcomposite-egl/main.cpp
index ea4f3970..07222f23 100644
--- a/src/plugins/hardwareintegration/client/xcomposite-egl/main.cpp
+++ b/src/plugins/hardwareintegration/client/xcomposite-egl/main.cpp
@@ -49,7 +49,7 @@ class QWaylandXCompositeEglClientBufferIntegrationPlugin : public QWaylandClient
Q_OBJECT
Q_PLUGIN_METADATA(IID QWaylandClientBufferIntegrationFactoryInterface_iid FILE "xcomposite-egl.json")
public:
- QWaylandClientBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
+ QWaylandClientBufferIntegration *create(const QString&, const QStringList&) override;
};
QWaylandClientBufferIntegration *QWaylandXCompositeEglClientBufferIntegrationPlugin::create(const QString& system, const QStringList& paramList)
diff --git a/src/plugins/hardwareintegration/client/xcomposite-egl/xcomposite-egl.pro b/src/plugins/hardwareintegration/client/xcomposite-egl/xcomposite-egl.pro
index 031d2812..c8734084 100644
--- a/src/plugins/hardwareintegration/client/xcomposite-egl/xcomposite-egl.pro
+++ b/src/plugins/hardwareintegration/client/xcomposite-egl/xcomposite-egl.pro
@@ -11,4 +11,5 @@ SOURCES += \
main.cpp
PLUGIN_TYPE = wayland-graphics-integration-client
+PLUGIN_CLASS_NAME = QWaylandXCompositeEglClientBufferIntegrationPlugin
load(qt_plugin)
diff --git a/src/plugins/hardwareintegration/client/xcomposite-glx/main.cpp b/src/plugins/hardwareintegration/client/xcomposite-glx/main.cpp
index 0a04f716..00fa255b 100644
--- a/src/plugins/hardwareintegration/client/xcomposite-glx/main.cpp
+++ b/src/plugins/hardwareintegration/client/xcomposite-glx/main.cpp
@@ -49,7 +49,7 @@ class QWaylandXCompositeGlxClientBufferIntegrationPlugin : public QWaylandClient
Q_OBJECT
Q_PLUGIN_METADATA(IID QWaylandClientBufferIntegrationFactoryInterface_iid FILE "xcomposite-glx.json")
public:
- QWaylandClientBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
+ QWaylandClientBufferIntegration *create(const QString&, const QStringList&) override;
};
QWaylandClientBufferIntegration *QWaylandXCompositeGlxClientBufferIntegrationPlugin::create(const QString& system, const QStringList& paramList)
diff --git a/src/plugins/hardwareintegration/client/xcomposite-glx/xcomposite-glx.pro b/src/plugins/hardwareintegration/client/xcomposite-glx/xcomposite-glx.pro
index eb8e03c7..fb5ad15f 100644
--- a/src/plugins/hardwareintegration/client/xcomposite-glx/xcomposite-glx.pro
+++ b/src/plugins/hardwareintegration/client/xcomposite-glx/xcomposite-glx.pro
@@ -8,4 +8,5 @@ SOURCES += \
main.cpp
PLUGIN_TYPE = wayland-graphics-integration-client
+PLUGIN_CLASS_NAME = QWaylandXCompositeGlxClientBufferIntegrationPlugin
load(qt_plugin)
diff --git a/src/plugins/hardwareintegration/compositor/brcm-egl/brcm-egl.pro b/src/plugins/hardwareintegration/compositor/brcm-egl/brcm-egl.pro
index e6e39572..53f7af8a 100644
--- a/src/plugins/hardwareintegration/compositor/brcm-egl/brcm-egl.pro
+++ b/src/plugins/hardwareintegration/compositor/brcm-egl/brcm-egl.pro
@@ -8,4 +8,5 @@ SOURCES += \
include(../../../../hardwareintegration/compositor/brcm-egl/brcm-egl.pri)
PLUGIN_TYPE = wayland-graphics-integration-server
+PLUGIN_CLASS_NAME = QWaylandBrcmClientBufferIntegrationPlugin
load(qt_plugin)
diff --git a/src/plugins/hardwareintegration/compositor/brcm-egl/main.cpp b/src/plugins/hardwareintegration/compositor/brcm-egl/main.cpp
index cd2c8646..1f57274c 100644
--- a/src/plugins/hardwareintegration/compositor/brcm-egl/main.cpp
+++ b/src/plugins/hardwareintegration/compositor/brcm-egl/main.cpp
@@ -42,15 +42,15 @@
QT_BEGIN_NAMESPACE
-class QWaylandBrcmClientBufferIntegration : public QtWayland::ClientBufferIntegrationPlugin
+class QWaylandBrcmClientBufferIntegrationPlugin : public QtWayland::ClientBufferIntegrationPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID QtWaylandClientBufferIntegrationFactoryInterface_iid FILE "brcm-egl.json")
public:
- QtWayland::ClientBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
+ QtWayland::ClientBufferIntegration *create(const QString&, const QStringList&) override;
};
-QtWayland::ClientBufferIntegration *QWaylandBrcmClientBufferIntegration::create(const QString& system, const QStringList& paramList)
+QtWayland::ClientBufferIntegration *QWaylandBrcmClientBufferIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
Q_UNUSED(system);
diff --git a/src/plugins/hardwareintegration/compositor/drm-egl-server/drm-egl-server.pro b/src/plugins/hardwareintegration/compositor/drm-egl-server/drm-egl-server.pro
index 40092a14..04003112 100644
--- a/src/plugins/hardwareintegration/compositor/drm-egl-server/drm-egl-server.pro
+++ b/src/plugins/hardwareintegration/compositor/drm-egl-server/drm-egl-server.pro
@@ -8,4 +8,5 @@ SOURCES += \
include($PWD/../../../../../hardwareintegration/compositor/drm-egl-server/drm-egl-server.pri)
PLUGIN_TYPE = wayland-graphics-integration-server
+PLUGIN_CLASS_NAME = DrmEglServerBufferIntegrationPlugin
load(qt_plugin)
diff --git a/src/plugins/hardwareintegration/compositor/drm-egl-server/main.cpp b/src/plugins/hardwareintegration/compositor/drm-egl-server/main.cpp
index 6ce6ba7f..768db567 100644
--- a/src/plugins/hardwareintegration/compositor/drm-egl-server/main.cpp
+++ b/src/plugins/hardwareintegration/compositor/drm-egl-server/main.cpp
@@ -47,7 +47,7 @@ class DrmEglServerBufferIntegrationPlugin : public QtWayland::ServerBufferIntegr
Q_OBJECT
Q_PLUGIN_METADATA(IID QtWaylandServerBufferIntegrationFactoryInterface_iid FILE "drm-egl-server.json")
public:
- QtWayland::ServerBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
+ QtWayland::ServerBufferIntegration *create(const QString&, const QStringList&) override;
};
QtWayland::ServerBufferIntegration *DrmEglServerBufferIntegrationPlugin::create(const QString& system, const QStringList& paramList)
diff --git a/src/plugins/hardwareintegration/compositor/libhybris-egl-server/libhybris-egl-server.pro b/src/plugins/hardwareintegration/compositor/libhybris-egl-server/libhybris-egl-server.pro
index e21bb3c5..9e28c7e8 100644
--- a/src/plugins/hardwareintegration/compositor/libhybris-egl-server/libhybris-egl-server.pro
+++ b/src/plugins/hardwareintegration/compositor/libhybris-egl-server/libhybris-egl-server.pro
@@ -8,4 +8,5 @@ SOURCES += \
include($PWD/../../../../../hardwareintegration/compositor/libhybris-egl-server/libhybris-egl-server.pri)
PLUGIN_TYPE = wayland-graphics-integration-server
+PLUGIN_CLASS_NAME = LibHybrisEglServerBufferIntegrationPlugin
load(qt_plugin)
diff --git a/src/plugins/hardwareintegration/compositor/wayland-egl/main.cpp b/src/plugins/hardwareintegration/compositor/wayland-egl/main.cpp
index 58b281fc..4cf15197 100644
--- a/src/plugins/hardwareintegration/compositor/wayland-egl/main.cpp
+++ b/src/plugins/hardwareintegration/compositor/wayland-egl/main.cpp
@@ -43,15 +43,15 @@
QT_BEGIN_NAMESPACE
-class QWaylandIntegrationPlugin : public QtWayland::ClientBufferIntegrationPlugin
+class QWaylandEglClientBufferIntegrationPlugin : public QtWayland::ClientBufferIntegrationPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID QtWaylandClientBufferIntegrationFactoryInterface_iid FILE "wayland-egl.json")
public:
- QtWayland::ClientBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
+ QtWayland::ClientBufferIntegration *create(const QString&, const QStringList&) override;
};
-QtWayland::ClientBufferIntegration *QWaylandIntegrationPlugin::create(const QString& system, const QStringList& paramList)
+QtWayland::ClientBufferIntegration *QWaylandEglClientBufferIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
Q_UNUSED(system);
diff --git a/src/plugins/hardwareintegration/compositor/wayland-egl/wayland-egl.pro b/src/plugins/hardwareintegration/compositor/wayland-egl/wayland-egl.pro
index 9ddd961c..f2229175 100644
--- a/src/plugins/hardwareintegration/compositor/wayland-egl/wayland-egl.pro
+++ b/src/plugins/hardwareintegration/compositor/wayland-egl/wayland-egl.pro
@@ -8,4 +8,5 @@ SOURCES += \
include(../../../../hardwareintegration/compositor/wayland-egl/wayland-egl.pri)
PLUGIN_TYPE = wayland-graphics-integration-server
+PLUGIN_CLASS_NAME = QWaylandEglClientBufferIntegrationPlugin
load(qt_plugin)
diff --git a/src/plugins/hardwareintegration/compositor/xcomposite-egl/main.cpp b/src/plugins/hardwareintegration/compositor/xcomposite-egl/main.cpp
index dfd55eb7..b9724bfe 100644
--- a/src/plugins/hardwareintegration/compositor/xcomposite-egl/main.cpp
+++ b/src/plugins/hardwareintegration/compositor/xcomposite-egl/main.cpp
@@ -42,15 +42,15 @@
QT_BEGIN_NAMESPACE
-class QWaylandXCompositeClientBufferIntegration : public QtWayland::ClientBufferIntegrationPlugin
+class QWaylandXCompositeEglClientBufferIntegrationPlugin : public QtWayland::ClientBufferIntegrationPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID QtWaylandClientBufferIntegrationFactoryInterface_iid FILE "xcomposite-egl.json")
public:
- QtWayland::ClientBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
+ QtWayland::ClientBufferIntegration *create(const QString&, const QStringList&) override;
};
-QtWayland::ClientBufferIntegration *QWaylandXCompositeClientBufferIntegration::create(const QString& system, const QStringList& paramList)
+QtWayland::ClientBufferIntegration *QWaylandXCompositeEglClientBufferIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
Q_UNUSED(system);
diff --git a/src/plugins/hardwareintegration/compositor/xcomposite-egl/xcomposite-egl.pro b/src/plugins/hardwareintegration/compositor/xcomposite-egl/xcomposite-egl.pro
index fab000e2..7c391bd1 100644
--- a/src/plugins/hardwareintegration/compositor/xcomposite-egl/xcomposite-egl.pro
+++ b/src/plugins/hardwareintegration/compositor/xcomposite-egl/xcomposite-egl.pro
@@ -8,4 +8,5 @@ SOURCES += \
include(../../../../hardwareintegration/compositor/xcomposite-egl/xcomposite-egl.pri)
PLUGIN_TYPE = wayland-graphics-integration-server
+PLUGIN_CLASS_NAME = QWaylandXCompositeEglClientBufferIntegrationPlugin
load(qt_plugin)
diff --git a/src/plugins/hardwareintegration/compositor/xcomposite-glx/main.cpp b/src/plugins/hardwareintegration/compositor/xcomposite-glx/main.cpp
index 903a6c90..b94711c9 100644
--- a/src/plugins/hardwareintegration/compositor/xcomposite-glx/main.cpp
+++ b/src/plugins/hardwareintegration/compositor/xcomposite-glx/main.cpp
@@ -42,15 +42,15 @@
QT_BEGIN_NAMESPACE
-class QWaylandXCompositeClientBufferIntegration : public QtWayland::ClientBufferIntegrationPlugin
+class QWaylandXCompositeGlxClientBufferIntegrationPlugin : public QtWayland::ClientBufferIntegrationPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID QtWaylandClientBufferIntegrationFactoryInterface_iid FILE "xcomposite-glx.json")
public:
- QtWayland::ClientBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
+ QtWayland::ClientBufferIntegration *create(const QString&, const QStringList&) override;
};
-QtWayland::ClientBufferIntegration *QWaylandXCompositeClientBufferIntegration::create(const QString& system, const QStringList& paramList)
+QtWayland::ClientBufferIntegration *QWaylandXCompositeGlxClientBufferIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
Q_UNUSED(system);
diff --git a/src/plugins/hardwareintegration/compositor/xcomposite-glx/xcomposite-glx.pro b/src/plugins/hardwareintegration/compositor/xcomposite-glx/xcomposite-glx.pro
index 9dee1431..0f49471d 100644
--- a/src/plugins/hardwareintegration/compositor/xcomposite-glx/xcomposite-glx.pro
+++ b/src/plugins/hardwareintegration/compositor/xcomposite-glx/xcomposite-glx.pro
@@ -8,4 +8,5 @@ SOURCES += \
include(../../../../hardwareintegration/compositor/xcomposite-glx/xcomposite-glx.pri)
PLUGIN_TYPE = wayland-graphics-integration-server
+PLUGIN_CLASS_NAME = QWaylandXCompositeGlxClientBufferIntegrationPlugin
load(qt_plugin)
diff --git a/src/plugins/platforms/qwayland-brcm-egl/main.cpp b/src/plugins/platforms/qwayland-brcm-egl/main.cpp
index 7e2228cf..2640c8ea 100644
--- a/src/plugins/platforms/qwayland-brcm-egl/main.cpp
+++ b/src/plugins/platforms/qwayland-brcm-egl/main.cpp
@@ -44,15 +44,15 @@ QT_BEGIN_NAMESPACE
namespace QtWaylandClient {
-class QWaylandIntegrationPlugin : public QPlatformIntegrationPlugin
+class QWaylandBrcmEglPlatformIntegrationPlugin : public QPlatformIntegrationPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE "qwayland-brcm-egl.json")
public:
- QPlatformIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
+ QPlatformIntegration *create(const QString&, const QStringList&) override;
};
-QPlatformIntegration *QWaylandIntegrationPlugin::create(const QString& system, const QStringList& paramList)
+QPlatformIntegration *QWaylandBrcmEglPlatformIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
Q_UNUSED(system);
diff --git a/src/plugins/platforms/qwayland-brcm-egl/qwayland-brcm-egl.pro b/src/plugins/platforms/qwayland-brcm-egl/qwayland-brcm-egl.pro
index 4ff61713..6455aa31 100644
--- a/src/plugins/platforms/qwayland-brcm-egl/qwayland-brcm-egl.pro
+++ b/src/plugins/platforms/qwayland-brcm-egl/qwayland-brcm-egl.pro
@@ -8,4 +8,5 @@ OTHER_FILES += \
SOURCES += main.cpp
PLUGIN_TYPE = platforms
+PLUGIN_CLASS_NAME = QWaylandBrcmEglPlatformIntegrationPlugin
load(qt_plugin)
diff --git a/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglplatformintegration.h b/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglplatformintegration.h
index d496e5ad..03584673 100644
--- a/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglplatformintegration.h
+++ b/src/plugins/platforms/qwayland-brcm-egl/qwaylandbrcmeglplatformintegration.h
@@ -57,7 +57,7 @@ public:
m_gl_integration->initialize(display());
}
- QWaylandClientBufferIntegration *clientBufferIntegration() const Q_DECL_OVERRIDE
+ QWaylandClientBufferIntegration *clientBufferIntegration() const override
{
return m_gl_integration;
}
diff --git a/src/plugins/platforms/qwayland-egl/main.cpp b/src/plugins/platforms/qwayland-egl/main.cpp
index 1143c859..ebeeff39 100644
--- a/src/plugins/platforms/qwayland-egl/main.cpp
+++ b/src/plugins/platforms/qwayland-egl/main.cpp
@@ -44,15 +44,15 @@ QT_BEGIN_NAMESPACE
namespace QtWaylandClient {
-class QWaylandIntegrationPlugin : public QPlatformIntegrationPlugin
+class QWaylandEglPlatformIntegrationPlugin : public QPlatformIntegrationPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE "qwayland-egl.json")
public:
- QPlatformIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
+ QPlatformIntegration *create(const QString&, const QStringList&) override;
};
-QPlatformIntegration *QWaylandIntegrationPlugin::create(const QString& system, const QStringList& paramList)
+QPlatformIntegration *QWaylandEglPlatformIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
Q_UNUSED(system);
diff --git a/src/plugins/platforms/qwayland-egl/qwayland-egl.pro b/src/plugins/platforms/qwayland-egl/qwayland-egl.pro
index b64a8cc4..9ac050da 100644
--- a/src/plugins/platforms/qwayland-egl/qwayland-egl.pro
+++ b/src/plugins/platforms/qwayland-egl/qwayland-egl.pro
@@ -8,4 +8,5 @@ OTHER_FILES += \
SOURCES += main.cpp
PLUGIN_TYPE = platforms
+PLUGIN_CLASS_NAME = QWaylandEglPlatformIntegrationPlugin
load(qt_plugin)
diff --git a/src/plugins/platforms/qwayland-generic/main.cpp b/src/plugins/platforms/qwayland-generic/main.cpp
index 24ecf0ba..08295c97 100644
--- a/src/plugins/platforms/qwayland-generic/main.cpp
+++ b/src/plugins/platforms/qwayland-generic/main.cpp
@@ -49,7 +49,7 @@ class QWaylandIntegrationPlugin : public QPlatformIntegrationPlugin
Q_OBJECT
Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE "qwayland-generic.json")
public:
- QPlatformIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
+ QPlatformIntegration *create(const QString&, const QStringList&) override;
};
QPlatformIntegration *QWaylandIntegrationPlugin::create(const QString& system, const QStringList& paramList)
diff --git a/src/plugins/platforms/qwayland-generic/qwayland-generic.pro b/src/plugins/platforms/qwayland-generic/qwayland-generic.pro
index 5457e9df..bfeab3fe 100644
--- a/src/plugins/platforms/qwayland-generic/qwayland-generic.pro
+++ b/src/plugins/platforms/qwayland-generic/qwayland-generic.pro
@@ -6,4 +6,5 @@ OTHER_FILES += \
SOURCES += main.cpp
PLUGIN_TYPE = platforms
+PLUGIN_CLASS_NAME = QWaylandIntegrationPlugin
load(qt_plugin)
diff --git a/src/plugins/platforms/qwayland-xcomposite-egl/main.cpp b/src/plugins/platforms/qwayland-xcomposite-egl/main.cpp
index 5393a03e..996f6084 100644
--- a/src/plugins/platforms/qwayland-xcomposite-egl/main.cpp
+++ b/src/plugins/platforms/qwayland-xcomposite-egl/main.cpp
@@ -44,15 +44,15 @@ QT_BEGIN_NAMESPACE
namespace QtWaylandClient {
-class QWaylandIntegrationPlugin : public QPlatformIntegrationPlugin
+class QWaylandXCompositeEglPlatformIntegrationPlugin : public QPlatformIntegrationPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE "qwayland-xcomposite-egl.json")
public:
- QPlatformIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
+ QPlatformIntegration *create(const QString&, const QStringList&) override;
};
-QPlatformIntegration *QWaylandIntegrationPlugin::create(const QString& system, const QStringList& paramList)
+QPlatformIntegration *QWaylandXCompositeEglPlatformIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
Q_UNUSED(system);
diff --git a/src/plugins/platforms/qwayland-xcomposite-egl/qwayland-xcomposite-egl.pro b/src/plugins/platforms/qwayland-xcomposite-egl/qwayland-xcomposite-egl.pro
index 7c7a3dd2..55246039 100644
--- a/src/plugins/platforms/qwayland-xcomposite-egl/qwayland-xcomposite-egl.pro
+++ b/src/plugins/platforms/qwayland-xcomposite-egl/qwayland-xcomposite-egl.pro
@@ -8,4 +8,5 @@ SOURCES += \
main.cpp
PLUGIN_TYPE = platforms
+PLUGIN_CLASS_NAME = QWaylandXCompositeEglPlatformIntegrationPlugin
load(qt_plugin)
diff --git a/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglplatformintegration.h b/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglplatformintegration.h
index 5d766543..009a12f6 100644
--- a/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglplatformintegration.h
+++ b/src/plugins/platforms/qwayland-xcomposite-egl/qwaylandxcompositeeglplatformintegration.h
@@ -58,7 +58,7 @@ public:
m_client_buffer_integration->initialize(display());
}
- QWaylandClientBufferIntegration *clientBufferIntegration() const Q_DECL_OVERRIDE
+ QWaylandClientBufferIntegration *clientBufferIntegration() const override
{ return m_client_buffer_integration; }
private:
diff --git a/src/plugins/platforms/qwayland-xcomposite-glx/main.cpp b/src/plugins/platforms/qwayland-xcomposite-glx/main.cpp
index 4dcce14e..9f075ebb 100644
--- a/src/plugins/platforms/qwayland-xcomposite-glx/main.cpp
+++ b/src/plugins/platforms/qwayland-xcomposite-glx/main.cpp
@@ -46,15 +46,15 @@ QT_BEGIN_NAMESPACE
namespace QtWaylandClient {
-class QWaylandIntegrationPlugin : public QPlatformIntegrationPlugin
+class QWaylandXCompositeGlxPlatformIntegrationPlugin : public QPlatformIntegrationPlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID QPlatformIntegrationFactoryInterface_iid FILE "qwayland-xcomposite-glx.json")
public:
- QPlatformIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
+ QPlatformIntegration *create(const QString&, const QStringList&) override;
};
-QPlatformIntegration *QWaylandIntegrationPlugin::create(const QString& system, const QStringList& paramList)
+QPlatformIntegration *QWaylandXCompositeGlxPlatformIntegrationPlugin::create(const QString& system, const QStringList& paramList)
{
Q_UNUSED(paramList);
Q_UNUSED(system);
diff --git a/src/plugins/platforms/qwayland-xcomposite-glx/qwayland-xcomposite-glx.pro b/src/plugins/platforms/qwayland-xcomposite-glx/qwayland-xcomposite-glx.pro
index c0c12c9d..899d939b 100644
--- a/src/plugins/platforms/qwayland-xcomposite-glx/qwayland-xcomposite-glx.pro
+++ b/src/plugins/platforms/qwayland-xcomposite-glx/qwayland-xcomposite-glx.pro
@@ -11,4 +11,5 @@ HEADERS += \
qwaylandxcompositeglxplatformintegration.h
PLUGIN_TYPE = platforms
+PLUGIN_CLASS_NAME = QWaylandXCompositeGlxPlatformIntegrationPlugin
load(qt_plugin)
diff --git a/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxplatformintegration.h b/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxplatformintegration.h
index ccc39553..a8a70bdd 100644
--- a/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxplatformintegration.h
+++ b/src/plugins/platforms/qwayland-xcomposite-glx/qwaylandxcompositeglxplatformintegration.h
@@ -59,7 +59,7 @@ public:
m_client_buffer_integration->initialize(display());
}
- QWaylandClientBufferIntegration *clientBufferIntegration() const Q_DECL_OVERRIDE
+ QWaylandClientBufferIntegration *clientBufferIntegration() const override
{ return m_client_buffer_integration; }
private:
diff --git a/src/plugins/shellintegration/ivi-shell/ivi-shell.pro b/src/plugins/shellintegration/ivi-shell/ivi-shell.pro
index baaf1698..ba716c10 100644
--- a/src/plugins/shellintegration/ivi-shell/ivi-shell.pro
+++ b/src/plugins/shellintegration/ivi-shell/ivi-shell.pro
@@ -1,6 +1,3 @@
-PLUGIN_TYPE = wayland-shell-integration
-load(qt_plugin)
-
QT += gui-private waylandclient-private
CONFIG += wayland-scanner
@@ -24,3 +21,7 @@ SOURCES += \
OTHER_FILES += \
ivi-shell.json
+
+PLUGIN_TYPE = wayland-shell-integration
+PLUGIN_CLASS_NAME = QWaylandIviShellIntegrationPlugin
+load(qt_plugin)
diff --git a/src/plugins/shellintegration/ivi-shell/main.cpp b/src/plugins/shellintegration/ivi-shell/main.cpp
index c7af9b15..70ffdb89 100644
--- a/src/plugins/shellintegration/ivi-shell/main.cpp
+++ b/src/plugins/shellintegration/ivi-shell/main.cpp
@@ -44,7 +44,7 @@ class QWaylandIviShellIntegrationPlugin : public QWaylandShellIntegrationPlugin
Q_PLUGIN_METADATA(IID QWaylandShellIntegrationFactoryInterface_iid FILE "ivi-shell.json")
public:
- virtual QWaylandShellIntegration *create(const QString &key, const QStringList &paramList) Q_DECL_OVERRIDE;
+ virtual QWaylandShellIntegration *create(const QString &key, const QStringList &paramList) override;
};
QWaylandShellIntegration *QWaylandIviShellIntegrationPlugin::create(const QString &key, const QStringList &paramList)
diff --git a/src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.h b/src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.h
index ef1c7609..5a0bfbdc 100644
--- a/src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.h
+++ b/src/plugins/shellintegration/ivi-shell/qwaylandivishellintegration.h
@@ -54,7 +54,7 @@ public:
QWaylandIviShellIntegration();
~QWaylandIviShellIntegration();
bool initialize(QWaylandDisplay *display);
- virtual QWaylandShellSurface *createShellSurface(QWaylandWindow *window) Q_DECL_OVERRIDE;
+ virtual QWaylandShellSurface *createShellSurface(QWaylandWindow *window) override;
private:
static void registryIvi(void *data, struct wl_registry *registry,
diff --git a/src/plugins/shellintegration/ivi-shell/qwaylandivisurface_p.h b/src/plugins/shellintegration/ivi-shell/qwaylandivisurface_p.h
index e332ce7f..d7aa2a69 100644
--- a/src/plugins/shellintegration/ivi-shell/qwaylandivisurface_p.h
+++ b/src/plugins/shellintegration/ivi-shell/qwaylandivisurface_p.h
@@ -60,8 +60,8 @@ public:
private:
void createExtendedSurface(QWaylandWindow *window);
- virtual void ivi_surface_configure(int32_t width, int32_t height) Q_DECL_OVERRIDE;
- void ivi_controller_surface_visibility(int32_t visibility) Q_DECL_OVERRIDE;
+ virtual void ivi_surface_configure(int32_t width, int32_t height) override;
+ void ivi_controller_surface_visibility(int32_t visibility) override;
QWaylandWindow *m_window;
QWaylandExtendedSurface *m_extendedWindow;
diff --git a/tests/auto/client/client/mockinput.h b/tests/auto/client/client/mockinput.h
index 7e88ffb0..9c217b6a 100644
--- a/tests/auto/client/client/mockinput.h
+++ b/tests/auto/client/client/mockinput.h
@@ -54,10 +54,10 @@ public:
Touch *touch() const { return m_touch.data(); }
protected:
- void seat_bind_resource(Resource *resource) Q_DECL_OVERRIDE;
- void seat_get_keyboard(Resource *resource, uint32_t id) Q_DECL_OVERRIDE;
- void seat_get_pointer(Resource *resource, uint32_t id) Q_DECL_OVERRIDE;
- void seat_get_touch(Resource *resource, uint32_t id) Q_DECL_OVERRIDE;
+ void seat_bind_resource(Resource *resource) override;
+ void seat_get_keyboard(Resource *resource, uint32_t id) override;
+ void seat_get_pointer(Resource *resource, uint32_t id) override;
+ void seat_get_touch(Resource *resource, uint32_t id) override;
private:
Compositor *m_compositor;
@@ -80,7 +80,7 @@ public:
void sendKey(uint32_t key, uint32_t state);
protected:
- void keyboard_destroy_resource(wl_keyboard::Resource *resource) Q_DECL_OVERRIDE;
+ void keyboard_destroy_resource(wl_keyboard::Resource *resource) override;
private:
Compositor *m_compositor;
@@ -103,7 +103,7 @@ public:
void sendButton(uint32_t button, uint32_t state);
protected:
- void pointer_destroy_resource(wl_pointer::Resource *resource) Q_DECL_OVERRIDE;
+ void pointer_destroy_resource(wl_pointer::Resource *resource) override;
private:
Compositor *m_compositor;
@@ -158,7 +158,7 @@ public:
DataDevice *dataDevice() const;
protected:
- void data_device_manager_get_data_device(Resource *resource, uint32_t id, struct ::wl_resource *seat) Q_DECL_OVERRIDE;
+ void data_device_manager_get_data_device(Resource *resource, uint32_t id, struct ::wl_resource *seat) override;
void data_device_manager_create_data_source(Resource *resource, uint32_t id) override;
private:
diff --git a/tests/auto/client/client/mocksurface.h b/tests/auto/client/client/mocksurface.h
index d04386ac..e34d6596 100644
--- a/tests/auto/client/client/mocksurface.h
+++ b/tests/auto/client/client/mocksurface.h
@@ -49,16 +49,16 @@ public:
protected:
- void surface_destroy_resource(Resource *resource) Q_DECL_OVERRIDE;
+ void surface_destroy_resource(Resource *resource) override;
- void surface_destroy(Resource *resource) Q_DECL_OVERRIDE;
+ void surface_destroy(Resource *resource) override;
void surface_attach(Resource *resource,
- struct wl_resource *buffer, int x, int y) Q_DECL_OVERRIDE;
+ struct wl_resource *buffer, int x, int y) override;
void surface_damage(Resource *resource,
- int32_t x, int32_t y, int32_t width, int32_t height) Q_DECL_OVERRIDE;
+ int32_t x, int32_t y, int32_t width, int32_t height) override;
void surface_frame(Resource *resource,
- uint32_t callback) Q_DECL_OVERRIDE;
- void surface_commit(Resource *resource) Q_DECL_OVERRIDE;
+ uint32_t callback) override;
+ void surface_commit(Resource *resource) override;
private:
wl_resource *m_buffer;
diff --git a/tests/auto/client/client/tst_client.cpp b/tests/auto/client/client/tst_client.cpp
index f48bb872..0c9c007a 100644
--- a/tests/auto/client/client/tst_client.cpp
+++ b/tests/auto/client/client/tst_client.cpp
@@ -91,7 +91,7 @@ public:
++mouseReleaseEventCount;
}
- void touchEvent(QTouchEvent *event) Q_DECL_OVERRIDE
+ void touchEvent(QTouchEvent *event) override
{
++touchEventCount;
}
@@ -269,7 +269,7 @@ public:
bool dragStarted;
protected:
- void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE
+ void mousePressEvent(QMouseEvent *event) override
{
if (dragStarted)
return;
diff --git a/tests/auto/compositor/compositor/testcompositor.h b/tests/auto/compositor/compositor/testcompositor.h
index 8eeb7ade..d80fe358 100644
--- a/tests/auto/compositor/compositor/testcompositor.h
+++ b/tests/auto/compositor/compositor/testcompositor.h
@@ -43,8 +43,8 @@ public slots:
void onSurfaceAboutToBeDestroyed(QWaylandSurface *surface);
protected:
- QWaylandSeat *createSeat() Q_DECL_OVERRIDE;
- QWaylandKeyboard *createKeyboardDevice(QWaylandSeat *seat) Q_DECL_OVERRIDE;
+ QWaylandSeat *createSeat() override;
+ QWaylandKeyboard *createKeyboardDevice(QWaylandSeat *seat) override;
public:
QList<QWaylandSurface *> surfaces;
diff --git a/tests/auto/compositor/compositor/testkeyboardgrabber.h b/tests/auto/compositor/compositor/testkeyboardgrabber.h
index 0ef59598..7f0f2c86 100644
--- a/tests/auto/compositor/compositor/testkeyboardgrabber.h
+++ b/tests/auto/compositor/compositor/testkeyboardgrabber.h
@@ -34,10 +34,10 @@ class TestKeyboardGrabber : public QWaylandKeyboard
public:
TestKeyboardGrabber(QWaylandSeat *seat);
- void setFocus(QWaylandSurface *surface) Q_DECL_OVERRIDE;
- void sendKeyModifiers(QWaylandClient *client, uint32_t serial) Q_DECL_OVERRIDE;
- void sendKeyPressEvent(uint code) Q_DECL_OVERRIDE;
- void sendKeyReleaseEvent(uint code) Q_DECL_OVERRIDE;
+ void setFocus(QWaylandSurface *surface) override;
+ void sendKeyModifiers(QWaylandClient *client, uint32_t serial) override;
+ void sendKeyPressEvent(uint code) override;
+ void sendKeyReleaseEvent(uint code) override;
signals:
void focusedCalled();
diff --git a/tests/auto/compositor/compositor/testseat.h b/tests/auto/compositor/compositor/testseat.h
index 7fa7030f..b9f04a2c 100644
--- a/tests/auto/compositor/compositor/testseat.h
+++ b/tests/auto/compositor/compositor/testseat.h
@@ -42,7 +42,7 @@ public:
TestSeat(QWaylandCompositor *compositor, QWaylandSeat::CapabilityFlags caps);
~TestSeat();
- bool isOwner(QInputEvent *inputEvent) const Q_DECL_OVERRIDE;
+ bool isOwner(QInputEvent *inputEvent) const override;
QList<QMouseEvent *> createMouseEvents(int count);
diff --git a/tests/auto/compositor/compositor/tst_compositor.cpp b/tests/auto/compositor/compositor/tst_compositor.cpp
index b31d51b4..3d7d2dab 100644
--- a/tests/auto/compositor/compositor/tst_compositor.cpp
+++ b/tests/auto/compositor/compositor/tst_compositor.cpp
@@ -315,7 +315,7 @@ void tst_WaylandCompositor::frameCallback()
class BufferView : public QWaylandView
{
public:
- void bufferCommitted(const QWaylandBufferRef &ref, const QRegion &damage) Q_DECL_OVERRIDE
+ void bufferCommitted(const QWaylandBufferRef &ref, const QRegion &damage) override
{
Q_UNUSED(damage);
bufferRef = ref;
@@ -529,7 +529,7 @@ void tst_WaylandCompositor::sendsXdgConfigure()
{
public:
MockXdgSurface(::xdg_surface *xdgSurface) : QtWayland::xdg_surface(xdgSurface) {}
- void xdg_surface_configure(int32_t width, int32_t height, wl_array *rawStates, uint32_t serial) Q_DECL_OVERRIDE
+ void xdg_surface_configure(int32_t width, int32_t height, wl_array *rawStates, uint32_t serial) override
{
configureSize = QSize(width, height);
configureSerial = serial;
@@ -729,7 +729,7 @@ void tst_WaylandCompositor::sendsIviConfigure()
{
public:
MockIviSurface(::ivi_surface *iviSurface) : QtWayland::ivi_surface(iviSurface) {}
- void ivi_surface_configure(int32_t width, int32_t height) Q_DECL_OVERRIDE
+ void ivi_surface_configure(int32_t width, int32_t height) override
{
configureSize = QSize(width, height);
}
diff --git a/tests/manual/scaling-compositor/main.cpp b/tests/manual/scaling-compositor/main.cpp
new file mode 100644
index 00000000..33ffb038
--- /dev/null
+++ b/tests/manual/scaling-compositor/main.cpp
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui/QGuiApplication>
+#include <QtQml/QQmlApplicationEngine>
+
+int main(int argc, char* argv[])
+{
+ QGuiApplication app(argc, argv);
+ QQmlApplicationEngine engine(QUrl("qrc:/main.qml"));
+ return app.exec();
+}
diff --git a/tests/manual/scaling-compositor/main.qml b/tests/manual/scaling-compositor/main.qml
new file mode 100644
index 00000000..e017a44f
--- /dev/null
+++ b/tests/manual/scaling-compositor/main.qml
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.2
+import QtQuick.Window 2.2
+import QtQuick.Controls 2.0
+import QtWayland.Compositor 1.0
+
+WaylandCompositor {
+ id: comp
+ WaylandOutput {
+ id: output
+ compositor: comp
+ sizeFollowsWindow: true
+ scaleFactor: 2
+ window: Window {
+ id: win
+ width: 500
+ height: 500
+ visible: true
+ title: "Scaling compositor x" + output.scaleFactor
+ Button {
+ id: incrementButton
+ text: "+"
+ onClicked: ++output.scaleFactor
+ }
+ Button {
+ text: "-"
+ onClicked: output.scaleFactor = Math.max(1, output.scaleFactor - 1)
+ anchors.left: incrementButton.right
+ }
+ Repeater {
+ model: shellSurfaces
+ ShellSurfaceItem {
+ shellSurface: modelData
+ onSurfaceDestroyed: shellSurfaces.remove(index);
+ }
+ }
+ }
+ }
+
+ ListModel { id: shellSurfaces }
+
+ WlShell {
+ onWlShellSurfaceCreated: shellSurfaces.append({shellSurface: shellSurface});
+ }
+}
diff --git a/tests/manual/scaling-compositor/qml.qrc b/tests/manual/scaling-compositor/qml.qrc
new file mode 100644
index 00000000..6b2d0a78
--- /dev/null
+++ b/tests/manual/scaling-compositor/qml.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>main.qml</file>
+</qresource>
+</RCC>
diff --git a/tests/manual/scaling-compositor/scaling-compositor.pro b/tests/manual/scaling-compositor/scaling-compositor.pro
new file mode 100644
index 00000000..847e07ea
--- /dev/null
+++ b/tests/manual/scaling-compositor/scaling-compositor.pro
@@ -0,0 +1,7 @@
+TEMPLATE = app
+
+QT += gui qml quickcontrols2
+
+SOURCES += main.cpp
+
+RESOURCES += qml.qrc
diff --git a/tests/manual/subsurface/shmwindow.h b/tests/manual/subsurface/shmwindow.h
index 451f5fc4..44d111e7 100644
--- a/tests/manual/subsurface/shmwindow.h
+++ b/tests/manual/subsurface/shmwindow.h
@@ -50,8 +50,8 @@ public:
explicit ShmWindow(QWindow *parent);
protected:
- void paintEvent(QPaintEvent *event) Q_DECL_OVERRIDE;
- void timerEvent(QTimerEvent *) Q_DECL_OVERRIDE;
+ void paintEvent(QPaintEvent *event) override;
+ void timerEvent(QTimerEvent *) override;
private:
int m_rotation;