diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-02-01 20:44:33 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-02-01 20:44:34 +0100 |
commit | ee58fc0edc94d18c2ab6d30f1836b23606ab2195 (patch) | |
tree | ab6a8ff67ebee6de5ad36f45970376790ea5c30d /src/compositor/extensions | |
parent | 4060e1416d0340b6c31ee193db6be3ce8083a4cd (diff) | |
parent | 44e3a9d321190f2958e1a1bdfa7f840e56355279 (diff) |
Merge dev into 5.9
Change-Id: I560f73aa89f2b833a405861bef510aad8fbd9a07
Diffstat (limited to 'src/compositor/extensions')
24 files changed, 135 insertions, 99 deletions
diff --git a/src/compositor/extensions/qwaylandiviapplication.h b/src/compositor/extensions/qwaylandiviapplication.h index 57a140bf7..1db45416f 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 ea211a84a..609a945e8 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 06e12a5ab..7feff17d8 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 4e11493fc..e362eecb9 100644 --- a/src/compositor/extensions/qwaylandivisurface.h +++ b/src/compositor/extensions/qwaylandivisurface.h @@ -74,7 +74,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: @@ -82,7 +82,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 db237721d..8cbec4148 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 4d3951025..7265abc33 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 a6df2138f..992ee6e62 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 f72b970c2..de03163cc 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 3cd9bf228..b9eb5ad62 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 997573c95..4a9d28cba 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 e8c75327c..1df9fed0e 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 da90cc90b..7af24bb25 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 805c61af8..4691ed0cd 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 955a5cc8a..5034f7e4d 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 7fe07e7a9..1ecc15cd6 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 77229ef03..70fd45f7d 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 abf5b627c..b32416764 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 c0bbcfd10..814f5e12d 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 0a86b9f6f..80aa52e70 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 bcc740c7d..269ea8934 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 31aa2112c..8e74a6a20 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 da4573c76..6f02ab399 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 a868cd831..2317d1a45 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 f3697aa83..d659872ae 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; |