From a147fedc76c84d2a6b50820a685288efb43f80db Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Wed, 13 Jul 2016 16:55:34 +0200 Subject: Rename createSurface and similar signals * createSurface -> surfaceRequested * createXdgSurface -> xdgSurfaceRequested * createXdgPopup -> xdgPopupRequested * createShellSurface -> wlShellSurfaceRequested * shellSurfaceCreated -> wlShellSurfaceCreated Change-Id: I715a927242130d7504955002a6a64a2bac516d46 Reviewed-by: Giulio Camuffo --- src/compositor/compositor_api/qwaylandcompositor.cpp | 4 ++-- src/compositor/compositor_api/qwaylandcompositor.h | 2 +- src/compositor/extensions/qwaylandwlshell.cpp | 8 ++++---- src/compositor/extensions/qwaylandwlshell.h | 4 ++-- src/compositor/extensions/qwaylandxdgshell.cpp | 8 ++++---- src/compositor/extensions/qwaylandxdgshell.h | 4 ++-- src/imports/compositor/plugins.qmltypes | 10 +++++----- 7 files changed, 20 insertions(+), 20 deletions(-) (limited to 'src') diff --git a/src/compositor/compositor_api/qwaylandcompositor.cpp b/src/compositor/compositor_api/qwaylandcompositor.cpp index a483a756..450e94ae 100644 --- a/src/compositor/compositor_api/qwaylandcompositor.cpp +++ b/src/compositor/compositor_api/qwaylandcompositor.cpp @@ -290,7 +290,7 @@ void QWaylandCompositorPrivate::compositor_create_surface(wl_compositor::Resourc { Q_Q(QWaylandCompositor); QWaylandClient *client = QWaylandClient::fromWlClient(q, resource->client()); - emit q->createSurface(client, id, resource->version()); + emit q->surfaceRequested(client, id, resource->version()); #ifndef QT_NO_DEBUG Q_ASSERT_X(!QWaylandSurfacePrivate::hasUninitializedSurface(), "QWaylandCompositor", QStringLiteral("Found uninitialized QWaylandSurface after emitting QWaylandCompositor::createSurface for id %1. All surfaces has to be initialized immediately after creation. See QWaylandSurface::initialize.").arg(id).toLocal8Bit().constData()); #endif @@ -416,7 +416,7 @@ void QWaylandCompositorPrivate::loadServerBufferIntegration() Normally, a compositor application will have a single WaylandCompositor instance, which can have several outputs as children. When a client requests the compositor to create a surface, the request is handled by - the onCreateSurface handler. + the onSurfaceRequested handler. Extensions that are supported by the compositor should be instantiated and added to the extensions property. diff --git a/src/compositor/compositor_api/qwaylandcompositor.h b/src/compositor/compositor_api/qwaylandcompositor.h index dd3c20e2..5bb795a4 100644 --- a/src/compositor/compositor_api/qwaylandcompositor.h +++ b/src/compositor/compositor_api/qwaylandcompositor.h @@ -126,7 +126,7 @@ public Q_SLOTS: void processWaylandEvents(); Q_SIGNALS: - void createSurface(QWaylandClient *client, uint id, int version); + void surfaceRequested(QWaylandClient *client, uint id, int version); void surfaceCreated(QWaylandSurface *surface); void surfaceAboutToBeDestroyed(QWaylandSurface *surface); void subsurfaceChanged(QWaylandSurface *child, QWaylandSurface *parent); diff --git a/src/compositor/extensions/qwaylandwlshell.cpp b/src/compositor/extensions/qwaylandwlshell.cpp index 3e53af62..f6dfc832 100644 --- a/src/compositor/extensions/qwaylandwlshell.cpp +++ b/src/compositor/extensions/qwaylandwlshell.cpp @@ -79,17 +79,17 @@ void QWaylandWlShellPrivate::shell_get_shell_surface(Resource *resource, uint32_ if (!surface->setRole(QWaylandWlShellSurface::role(), displayRes, WL_DISPLAY_ERROR_INVALID_OBJECT)) return; - emit q->createShellSurface(surface, shellSurfaceResource); + emit q->wlShellSurfaceRequested(surface, shellSurfaceResource); QWaylandWlShellSurface *shellSurface = QWaylandWlShellSurface::fromResource(shellSurfaceResource.resource()); if (!shellSurface) { - // A QWaylandShellSurface was not created in response to the createShellSurface signal - // we create one as fallback here instead. + // A QWaylandWlShellSurface was not created in response to the wlShellSurfaceRequested + // signal, so we create one as fallback here instead. shellSurface = new QWaylandWlShellSurface(q, surface, shellSurfaceResource); } m_shellSurfaces.append(shellSurface); - emit q->shellSurfaceCreated(shellSurface); + emit q->wlShellSurfaceCreated(shellSurface); } void QWaylandWlShellPrivate::unregisterShellSurface(QWaylandWlShellSurface *shellSurface) diff --git a/src/compositor/extensions/qwaylandwlshell.h b/src/compositor/extensions/qwaylandwlshell.h index ce6ca895..beed3412 100644 --- a/src/compositor/extensions/qwaylandwlshell.h +++ b/src/compositor/extensions/qwaylandwlshell.h @@ -70,8 +70,8 @@ public: static QByteArray interfaceName(); Q_SIGNALS: - void createShellSurface(QWaylandSurface *surface, const QWaylandResource &resource); - void shellSurfaceCreated(QWaylandWlShellSurface *shellSurface); + void wlShellSurfaceRequested(QWaylandSurface *surface, const QWaylandResource &resource); + void wlShellSurfaceCreated(QWaylandWlShellSurface *shellSurface); }; class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandWlShellSurface : public QWaylandShellSurfaceTemplate diff --git a/src/compositor/extensions/qwaylandxdgshell.cpp b/src/compositor/extensions/qwaylandxdgshell.cpp index 8299bd4c..96fc171d 100644 --- a/src/compositor/extensions/qwaylandxdgshell.cpp +++ b/src/compositor/extensions/qwaylandxdgshell.cpp @@ -150,11 +150,11 @@ void QWaylandXdgShellPrivate::xdg_shell_get_xdg_surface(Resource *resource, uint QWaylandResource xdgSurfaceResource(wl_resource_create(resource->client(), &xdg_surface_interface, wl_resource_get_version(resource->handle), id)); - emit q->createXdgSurface(surface, xdgSurfaceResource); + emit q->xdgSurfaceRequested(surface, xdgSurfaceResource); QWaylandXdgSurface *xdgSurface = QWaylandXdgSurface::fromResource(xdgSurfaceResource.resource()); if (!xdgSurface) { - // A QWaylandXdgSurface was not created in response to the createXdgSurface signal, so we + // A QWaylandXdgSurface was not created in response to the xdgSurfaceRequested signal, so we // create one as fallback here instead. xdgSurface = new QWaylandXdgSurface(q, surface, xdgSurfaceResource); } @@ -196,11 +196,11 @@ void QWaylandXdgShellPrivate::xdg_shell_get_xdg_popup(Resource *resource, uint32 wl_resource_get_version(resource->handle), id)); QWaylandInputDevice *inputDevice = QWaylandInputDevice::fromSeatResource(seat); QPoint position(x, y); - emit q->createXdgPopup(surface, parentSurface, inputDevice, position, xdgPopupResource); + emit q->xdgPopupRequested(surface, parentSurface, inputDevice, position, xdgPopupResource); QWaylandXdgPopup *xdgPopup = QWaylandXdgPopup::fromResource(xdgPopupResource.resource()); if (!xdgPopup) { - // A QWaylandXdgPopup was not created in response to the createXdgPopup signal, so we + // A QWaylandXdgPopup was not created in response to the xdgPopupRequested signal, so we // create one as fallback here instead. xdgPopup = new QWaylandXdgPopup(q, surface, parentSurface, position, xdgPopupResource); } diff --git a/src/compositor/extensions/qwaylandxdgshell.h b/src/compositor/extensions/qwaylandxdgshell.h index af198989..420fb98b 100644 --- a/src/compositor/extensions/qwaylandxdgshell.h +++ b/src/compositor/extensions/qwaylandxdgshell.h @@ -77,10 +77,10 @@ public Q_SLOTS: void closeAllPopups(); Q_SIGNALS: - void createXdgSurface(QWaylandSurface *surface, const QWaylandResource &resource); + void xdgSurfaceRequested(QWaylandSurface *surface, const QWaylandResource &resource); void xdgSurfaceCreated(QWaylandXdgSurface *xdgSurface); void xdgPopupCreated(QWaylandXdgPopup *xdgPopup); - void createXdgPopup(QWaylandSurface *surface, QWaylandSurface *parent, QWaylandInputDevice *seat, const QPoint &position, const QWaylandResource &resource); + void xdgPopupRequested(QWaylandSurface *surface, QWaylandSurface *parent, QWaylandInputDevice *seat, const QPoint &position, const QWaylandResource &resource); void pong(uint serial); private Q_SLOTS: diff --git a/src/imports/compositor/plugins.qmltypes b/src/imports/compositor/plugins.qmltypes index c57810a8..7720176e 100644 --- a/src/imports/compositor/plugins.qmltypes +++ b/src/imports/compositor/plugins.qmltypes @@ -41,7 +41,7 @@ Module { isPointer: true } Signal { - name: "createSurface" + name: "surfaceRequested" Parameter { name: "client"; type: "QWaylandClient"; isPointer: true } Parameter { name: "id"; type: "uint" } Parameter { name: "version"; type: "int" } @@ -409,12 +409,12 @@ Module { name: "QWaylandWlShell" prototype: "QWaylandCompositorExtension" Signal { - name: "createShellSurface" + name: "wlShellSurfaceRequested" Parameter { name: "surface"; type: "QWaylandSurface"; isPointer: true } Parameter { name: "resource"; type: "QWaylandResource" } } Signal { - name: "shellSurfaceCreated" + name: "wlShellSurfaceCreated" Parameter { name: "shellSurface"; type: "QWaylandWlShellSurface"; isPointer: true } } } @@ -524,7 +524,7 @@ Module { name: "QWaylandXdgShell" prototype: "QWaylandCompositorExtension" Signal { - name: "createXdgSurface" + name: "xdgSurfaceRequested" Parameter { name: "surface"; type: "QWaylandSurface"; isPointer: true } Parameter { name: "resource"; type: "QWaylandResource" } } @@ -537,7 +537,7 @@ Module { Parameter { name: "xdgPopup"; type: "QWaylandXdgPopup"; isPointer: true } } Signal { - name: "createXdgPopup" + name: "xdgPopupRequested" Parameter { name: "surface"; type: "QWaylandSurface"; isPointer: true } Parameter { name: "parent"; type: "QWaylandSurface"; isPointer: true } Parameter { name: "seat"; type: "QWaylandInputDevice"; isPointer: true } -- cgit v1.2.1