qtwayland: move to mainline 5.5.0
This can go away as sson as 5.5 is released Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
This commit is contained in:
@@ -1,621 +0,0 @@
|
|||||||
From 23c447b5bcc7767bd06176d8ed1dfa2c66eb588d Mon Sep 17 00:00:00 2001
|
|
||||||
From: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
|
|
||||||
Date: Wed, 31 Dec 2014 11:35:53 +0100
|
|
||||||
Subject: [PATCH 1/3] Move surfaces to outputs
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
Moving surfaces to belong to a specific output.
|
|
||||||
Surfaces can be viewed on a different output anyway.
|
|
||||||
|
|
||||||
Change-Id: I9ef76300f85190d84b83431374e76e581786e4e7
|
|
||||||
Done-with: Jørgen Lind <jorgen.lind@theqtcompany.com>
|
|
||||||
---
|
|
||||||
.../compositor_api/qwaylandcompositor.cpp | 75 ++++++++++++++--------
|
|
||||||
src/compositor/compositor_api/qwaylandcompositor.h | 12 ++--
|
|
||||||
src/compositor/compositor_api/qwaylandoutput.cpp | 30 +++++++++
|
|
||||||
src/compositor/compositor_api/qwaylandoutput.h | 11 ++++
|
|
||||||
.../compositor_api/qwaylandquickcompositor.cpp | 3 +-
|
|
||||||
.../compositor_api/qwaylandquicksurface.cpp | 18 ++++--
|
|
||||||
.../compositor_api/qwaylandquicksurface.h | 3 +
|
|
||||||
src/compositor/compositor_api/qwaylandsurface.cpp | 5 ++
|
|
||||||
src/compositor/compositor_api/qwaylandsurface.h | 16 +++++
|
|
||||||
src/compositor/wayland_wrapper/qwlcompositor.cpp | 24 +------
|
|
||||||
src/compositor/wayland_wrapper/qwlcompositor_p.h | 5 --
|
|
||||||
src/compositor/wayland_wrapper/qwloutput.cpp | 45 +++++++++++++
|
|
||||||
src/compositor/wayland_wrapper/qwloutput_p.h | 10 +++
|
|
||||||
src/compositor/wayland_wrapper/qwlsurface.cpp | 39 ++++++++++-
|
|
||||||
src/compositor/wayland_wrapper/qwlsurface_p.h | 2 +
|
|
||||||
15 files changed, 233 insertions(+), 65 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/compositor/compositor_api/qwaylandcompositor.cpp b/src/compositor/compositor_api/qwaylandcompositor.cpp
|
|
||||||
index 1839832..93a9cc6 100644
|
|
||||||
--- a/src/compositor/compositor_api/qwaylandcompositor.cpp
|
|
||||||
+++ b/src/compositor/compositor_api/qwaylandcompositor.cpp
|
|
||||||
@@ -98,17 +98,6 @@ struct wl_display *QWaylandCompositor::waylandDisplay() const
|
|
||||||
return m_compositor->wl_display();
|
|
||||||
}
|
|
||||||
|
|
||||||
-void QWaylandCompositor::sendFrameCallbacks(QList<QWaylandSurface *> visibleSurfaces)
|
|
||||||
-{
|
|
||||||
- m_compositor->sendFrameCallbacks(visibleSurfaces);
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-void QWaylandCompositor::frameStarted()
|
|
||||||
-{
|
|
||||||
- for (QtWayland::Surface *surf: m_compositor->surfaces())
|
|
||||||
- surf->frameStarted();
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
void QWaylandCompositor::destroyClientForSurface(QWaylandSurface *surface)
|
|
||||||
{
|
|
||||||
destroyClient(surface->client());
|
|
||||||
@@ -119,29 +108,54 @@ void QWaylandCompositor::destroyClient(QWaylandClient *client)
|
|
||||||
m_compositor->destroyClient(client);
|
|
||||||
}
|
|
||||||
|
|
||||||
-QList<QWaylandSurface *> QWaylandCompositor::surfacesForClient(QWaylandClient* client) const
|
|
||||||
+#if QT_DEPRECATED_SINCE(5, 5)
|
|
||||||
+void QWaylandCompositor::frameStarted()
|
|
||||||
{
|
|
||||||
- QList<QtWayland::Surface *> surfaces = m_compositor->surfaces();
|
|
||||||
+ Q_FOREACH (QWaylandOutput *output, outputs())
|
|
||||||
+ output->frameStarted();
|
|
||||||
+}
|
|
||||||
|
|
||||||
- QList<QWaylandSurface *> result;
|
|
||||||
+typedef QList<QWaylandSurface *> QWaylandSurfaceList;
|
|
||||||
+typedef std::pair<QWaylandOutput *, QWaylandSurfaceList> QWaylandOutputSurfaceListPair;
|
|
||||||
|
|
||||||
- for (int i = 0; i < surfaces.count(); ++i) {
|
|
||||||
- if (surfaces.at(i)->waylandSurface()->client() == client) {
|
|
||||||
- result.append(surfaces.at(i)->waylandSurface());
|
|
||||||
- }
|
|
||||||
+static QList<QWaylandSurface *> &getSurfaceListForOutput(QList<QWaylandOutputSurfaceListPair> &list, QWaylandOutput *output)
|
|
||||||
+{
|
|
||||||
+ for (int i = 0; i < list.size(); i++) {
|
|
||||||
+ if (list.at(i).first == output)
|
|
||||||
+ return list[i].second;
|
|
||||||
}
|
|
||||||
|
|
||||||
- return result;
|
|
||||||
+ list.append(std::make_pair(output, QList<QWaylandSurface *>()));
|
|
||||||
+ return list.last().second;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void QWaylandCompositor::sendFrameCallbacks(QList<QWaylandSurface *> visibleSurfaces)
|
|
||||||
+{
|
|
||||||
+ QList<QWaylandOutputSurfaceListPair> visibleOutputSurfaces;
|
|
||||||
+ Q_FOREACH (QWaylandSurface *surface, visibleSurfaces) {
|
|
||||||
+ getSurfaceListForOutput(visibleOutputSurfaces, surface->output()).append(surface);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ for (int i = 0; i < visibleOutputSurfaces.size(); i++)
|
|
||||||
+ visibleOutputSurfaces.at(i).first->sendFrameCallbacks(visibleOutputSurfaces.at(i).second);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+QList<QWaylandSurface *> QWaylandCompositor::surfacesForClient(QWaylandClient* client) const
|
|
||||||
+{
|
|
||||||
+ QList<QWaylandSurface *> surfaces;
|
|
||||||
+ Q_FOREACH (QWaylandOutput *output, outputs())
|
|
||||||
+ surfaces.append(output->surfacesForClient(client));
|
|
||||||
+ return surfaces;
|
|
||||||
}
|
|
||||||
|
|
||||||
QList<QWaylandSurface *> QWaylandCompositor::surfaces() const
|
|
||||||
{
|
|
||||||
- QList<QtWayland::Surface *> surfaces = m_compositor->surfaces();
|
|
||||||
QList<QWaylandSurface *> surfs;
|
|
||||||
- foreach (QtWayland::Surface *s, surfaces)
|
|
||||||
- surfs << s->waylandSurface();
|
|
||||||
+ Q_FOREACH (QWaylandOutput *output, outputs())
|
|
||||||
+ surfs.append(output->surfaces());
|
|
||||||
return surfs;
|
|
||||||
}
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
QList<QWaylandOutput *> QWaylandCompositor::outputs() const
|
|
||||||
{
|
|
||||||
@@ -175,13 +189,20 @@ void QWaylandCompositor::surfaceAboutToBeDestroyed(QWaylandSurface *surface)
|
|
||||||
|
|
||||||
QWaylandSurfaceView *QWaylandCompositor::pickView(const QPointF &globalPosition) const
|
|
||||||
{
|
|
||||||
- Q_FOREACH (QtWayland::Surface *surface, m_compositor->surfaces()) {
|
|
||||||
- foreach (QWaylandSurfaceView *view, surface->waylandSurface()->views())
|
|
||||||
- if (QRectF(view->pos(), surface->size()).contains(globalPosition))
|
|
||||||
- return view;
|
|
||||||
+ Q_FOREACH (QWaylandOutput *output, outputs()) {
|
|
||||||
+ // Skip coordinates not in output
|
|
||||||
+ if (!QRectF(output->geometry()).contains(globalPosition))
|
|
||||||
+ continue;
|
|
||||||
+
|
|
||||||
+ Q_FOREACH (QWaylandSurface *surface, output->surfaces()) {
|
|
||||||
+ Q_FOREACH (QWaylandSurfaceView *view, surface->views()) {
|
|
||||||
+ if (QRectF(view->pos(), surface->size()).contains(globalPosition))
|
|
||||||
+ return view;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
- return 0;
|
|
||||||
+ return Q_NULLPTR;
|
|
||||||
}
|
|
||||||
|
|
||||||
QPointF QWaylandCompositor::mapToView(QWaylandSurfaceView *surface, const QPointF &globalPosition) const
|
|
||||||
diff --git a/src/compositor/compositor_api/qwaylandcompositor.h b/src/compositor/compositor_api/qwaylandcompositor.h
|
|
||||||
index c1c7855..1e482eb 100644
|
|
||||||
--- a/src/compositor/compositor_api/qwaylandcompositor.h
|
|
||||||
+++ b/src/compositor/compositor_api/qwaylandcompositor.h
|
|
||||||
@@ -94,14 +94,16 @@ public:
|
|
||||||
void addDefaultShell();
|
|
||||||
::wl_display *waylandDisplay() const;
|
|
||||||
|
|
||||||
- void frameStarted();
|
|
||||||
- void sendFrameCallbacks(QList<QWaylandSurface *> visibleSurfaces);
|
|
||||||
-
|
|
||||||
void destroyClientForSurface(QWaylandSurface *surface);
|
|
||||||
void destroyClient(QWaylandClient *client);
|
|
||||||
|
|
||||||
- QList<QWaylandSurface *> surfacesForClient(QWaylandClient* client) const;
|
|
||||||
- QList<QWaylandSurface *> surfaces() const;
|
|
||||||
+#if QT_DEPRECATED_SINCE(5, 5)
|
|
||||||
+ QT_DEPRECATED void frameStarted();
|
|
||||||
+ QT_DEPRECATED void sendFrameCallbacks(QList<QWaylandSurface *> visibleSurfaces);
|
|
||||||
+
|
|
||||||
+ QT_DEPRECATED QList<QWaylandSurface *> surfacesForClient(QWaylandClient* client) const;
|
|
||||||
+ QT_DEPRECATED QList<QWaylandSurface *> surfaces() const;
|
|
||||||
+#endif
|
|
||||||
|
|
||||||
QList<QWaylandOutput *> outputs() const;
|
|
||||||
QWaylandOutput *output(QWindow *window);
|
|
||||||
diff --git a/src/compositor/compositor_api/qwaylandoutput.cpp b/src/compositor/compositor_api/qwaylandoutput.cpp
|
|
||||||
index ab2ee52..a4ed354 100644
|
|
||||||
--- a/src/compositor/compositor_api/qwaylandoutput.cpp
|
|
||||||
+++ b/src/compositor/compositor_api/qwaylandoutput.cpp
|
|
||||||
@@ -244,3 +244,33 @@ QtWayland::Output *QWaylandOutput::handle()
|
|
||||||
{
|
|
||||||
return d_ptr;
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+void QWaylandOutput::frameStarted()
|
|
||||||
+{
|
|
||||||
+ d_ptr->frameStarted();
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void QWaylandOutput::sendFrameCallbacks(QList<QWaylandSurface *> visibleSurfaces)
|
|
||||||
+{
|
|
||||||
+ d_ptr->sendFrameCallbacks(visibleSurfaces);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+QList<QWaylandSurface *> QWaylandOutput::surfaces() const
|
|
||||||
+{
|
|
||||||
+ return d_ptr->surfaces();
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+QList<QWaylandSurface *> QWaylandOutput::surfacesForClient(QWaylandClient *client) const
|
|
||||||
+{
|
|
||||||
+ return d_ptr->surfacesForClient(client);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void QWaylandOutput::addSurface(QWaylandSurface *surface)
|
|
||||||
+{
|
|
||||||
+ d_ptr->addSurface(surface);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void QWaylandOutput::removeSurface(QWaylandSurface *surface)
|
|
||||||
+{
|
|
||||||
+ d_ptr->removeSurface(surface);
|
|
||||||
+}
|
|
||||||
diff --git a/src/compositor/compositor_api/qwaylandoutput.h b/src/compositor/compositor_api/qwaylandoutput.h
|
|
||||||
index 5c31be9..abf217f 100644
|
|
||||||
--- a/src/compositor/compositor_api/qwaylandoutput.h
|
|
||||||
+++ b/src/compositor/compositor_api/qwaylandoutput.h
|
|
||||||
@@ -54,6 +54,8 @@ struct wl_resource;
|
|
||||||
|
|
||||||
class QWaylandCompositor;
|
|
||||||
class QWindow;
|
|
||||||
+class QWaylandSurface;
|
|
||||||
+class QWaylandClient;
|
|
||||||
|
|
||||||
namespace QtWayland {
|
|
||||||
class Output;
|
|
||||||
@@ -143,6 +145,15 @@ public:
|
|
||||||
|
|
||||||
QtWayland::Output *handle();
|
|
||||||
|
|
||||||
+ void frameStarted();
|
|
||||||
+ void sendFrameCallbacks(QList<QWaylandSurface *> visibleSurfaces);
|
|
||||||
+
|
|
||||||
+ QList<QWaylandSurface *> surfaces() const;
|
|
||||||
+ QList<QWaylandSurface *> surfacesForClient(QWaylandClient *client) const;
|
|
||||||
+
|
|
||||||
+ void addSurface(QWaylandSurface *surface);
|
|
||||||
+ void removeSurface(QWaylandSurface *surface);
|
|
||||||
+
|
|
||||||
Q_SIGNALS:
|
|
||||||
void positionChanged();
|
|
||||||
void geometryChanged();
|
|
||||||
diff --git a/src/compositor/compositor_api/qwaylandquickcompositor.cpp b/src/compositor/compositor_api/qwaylandquickcompositor.cpp
|
|
||||||
index bd053a9..902954c 100644
|
|
||||||
--- a/src/compositor/compositor_api/qwaylandquickcompositor.cpp
|
|
||||||
+++ b/src/compositor/compositor_api/qwaylandquickcompositor.cpp
|
|
||||||
@@ -40,6 +40,7 @@
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#include <QtCompositor/private/qwlcompositor_p.h>
|
|
||||||
+#include <QtCompositor/private/qwlsurface_p.h>
|
|
||||||
|
|
||||||
#include "qwaylandclient.h"
|
|
||||||
#include "qwaylandquickcompositor.h"
|
|
||||||
@@ -61,7 +62,7 @@ public:
|
|
||||||
void compositor_create_surface(Resource *resource, uint32_t id) Q_DECL_OVERRIDE
|
|
||||||
{
|
|
||||||
QWaylandQuickSurface *surface = new QWaylandQuickSurface(resource->client(), id, wl_resource_get_version(resource->handle), static_cast<QWaylandQuickCompositor *>(m_qt_compositor));
|
|
||||||
- m_surfaces << surface->handle();
|
|
||||||
+ primaryOutput()->addSurface(surface);
|
|
||||||
//BUG: This may not be an on-screen window surface though
|
|
||||||
m_qt_compositor->surfaceCreated(surface);
|
|
||||||
}
|
|
||||||
diff --git a/src/compositor/compositor_api/qwaylandquicksurface.cpp b/src/compositor/compositor_api/qwaylandquicksurface.cpp
|
|
||||||
index 83b37da..4edb968 100644
|
|
||||||
--- a/src/compositor/compositor_api/qwaylandquicksurface.cpp
|
|
||||||
+++ b/src/compositor/compositor_api/qwaylandquicksurface.cpp
|
|
||||||
@@ -167,12 +167,8 @@ QWaylandQuickSurface::QWaylandQuickSurface(wl_client *client, quint32 id, int ve
|
|
||||||
d->buffer->surface = this;
|
|
||||||
setBufferAttacher(d->buffer);
|
|
||||||
|
|
||||||
- QQuickWindow *window = static_cast<QQuickWindow *>(output()->window());
|
|
||||||
- connect(window, &QQuickWindow::beforeSynchronizing, this, &QWaylandQuickSurface::updateTexture, Qt::DirectConnection);
|
|
||||||
- connect(window, &QQuickWindow::sceneGraphInvalidated, this, &QWaylandQuickSurface::invalidateTexture, Qt::DirectConnection);
|
|
||||||
connect(this, &QWaylandSurface::windowPropertyChanged, d->windowPropertyMap, &QQmlPropertyMap::insert);
|
|
||||||
connect(d->windowPropertyMap, &QQmlPropertyMap::valueChanged, this, &QWaylandSurface::setWindowProperty);
|
|
||||||
-
|
|
||||||
}
|
|
||||||
|
|
||||||
QWaylandQuickSurface::~QWaylandQuickSurface()
|
|
||||||
@@ -208,6 +204,20 @@ QObject *QWaylandQuickSurface::windowPropertyMap() const
|
|
||||||
return d->windowPropertyMap;
|
|
||||||
}
|
|
||||||
|
|
||||||
+void QWaylandQuickSurface::outputChangedEvent(QWaylandOutputChangedEvent *event)
|
|
||||||
+{
|
|
||||||
+ if (event->oldOutput) {
|
|
||||||
+ QQuickWindow *oldWindow = static_cast<QQuickWindow *>(event->oldOutput->window());
|
|
||||||
+ disconnect(oldWindow, &QQuickWindow::beforeSynchronizing, this, &QWaylandQuickSurface::updateTexture);
|
|
||||||
+ disconnect(oldWindow, &QQuickWindow::sceneGraphInvalidated, this, &QWaylandQuickSurface::invalidateTexture);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (event->newOutput) {
|
|
||||||
+ QQuickWindow *window = static_cast<QQuickWindow *>(event->newOutput->window());
|
|
||||||
+ connect(window, &QQuickWindow::beforeSynchronizing, this, &QWaylandQuickSurface::updateTexture, Qt::DirectConnection);
|
|
||||||
+ connect(window, &QQuickWindow::sceneGraphInvalidated, this, &QWaylandQuickSurface::invalidateTexture, Qt::DirectConnection);
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
|
|
||||||
void QWaylandQuickSurface::updateTexture()
|
|
||||||
{
|
|
||||||
diff --git a/src/compositor/compositor_api/qwaylandquicksurface.h b/src/compositor/compositor_api/qwaylandquicksurface.h
|
|
||||||
index d65a982..9ac3b66 100644
|
|
||||||
--- a/src/compositor/compositor_api/qwaylandquicksurface.h
|
|
||||||
+++ b/src/compositor/compositor_api/qwaylandquicksurface.h
|
|
||||||
@@ -75,6 +75,9 @@ public:
|
|
||||||
|
|
||||||
QObject *windowPropertyMap() const;
|
|
||||||
|
|
||||||
+protected:
|
|
||||||
+ void outputChangedEvent(QWaylandOutputChangedEvent *event) Q_DECL_OVERRIDE;
|
|
||||||
+
|
|
||||||
Q_SIGNALS:
|
|
||||||
void useTextureAlphaChanged();
|
|
||||||
void clientRenderingEnabledChanged();
|
|
||||||
diff --git a/src/compositor/compositor_api/qwaylandsurface.cpp b/src/compositor/compositor_api/qwaylandsurface.cpp
|
|
||||||
index b504d2f..17cfce0 100644
|
|
||||||
--- a/src/compositor/compositor_api/qwaylandsurface.cpp
|
|
||||||
+++ b/src/compositor/compositor_api/qwaylandsurface.cpp
|
|
||||||
@@ -266,6 +266,11 @@ void QWaylandSurface::setVisibility(QWindow::Visibility v)
|
|
||||||
emit visibilityChanged();
|
|
||||||
}
|
|
||||||
|
|
||||||
+void QWaylandSurface::outputChangedEvent(QWaylandOutputChangedEvent *event)
|
|
||||||
+{
|
|
||||||
+ Q_UNUSED(event);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
bool QWaylandSurface::sendInterfaceOp(QWaylandSurfaceOp &op)
|
|
||||||
{
|
|
||||||
Q_D(QWaylandSurface);
|
|
||||||
diff --git a/src/compositor/compositor_api/qwaylandsurface.h b/src/compositor/compositor_api/qwaylandsurface.h
|
|
||||||
index 1294d4f..d4ddfc5 100644
|
|
||||||
--- a/src/compositor/compositor_api/qwaylandsurface.h
|
|
||||||
+++ b/src/compositor/compositor_api/qwaylandsurface.h
|
|
||||||
@@ -81,6 +81,19 @@ protected:
|
|
||||||
friend class QtWayland::Surface;
|
|
||||||
};
|
|
||||||
|
|
||||||
+class QWaylandOutputChangedEvent
|
|
||||||
+{
|
|
||||||
+public:
|
|
||||||
+ QWaylandOutputChangedEvent(QWaylandOutput *oldOutput, QWaylandOutput *newOutput)
|
|
||||||
+ : oldOutput(oldOutput)
|
|
||||||
+ , newOutput(newOutput)
|
|
||||||
+ {
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ QWaylandOutput *oldOutput;
|
|
||||||
+ QWaylandOutput *newOutput;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
class Q_COMPOSITOR_EXPORT QWaylandSurface : public QObject
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
@@ -198,6 +211,8 @@ public slots:
|
|
||||||
protected:
|
|
||||||
QWaylandSurface(QWaylandSurfacePrivate *dptr);
|
|
||||||
|
|
||||||
+ virtual void outputChangedEvent(QWaylandOutputChangedEvent *event);
|
|
||||||
+
|
|
||||||
Q_SIGNALS:
|
|
||||||
void mapped();
|
|
||||||
void unmapped();
|
|
||||||
@@ -223,6 +238,7 @@ Q_SIGNALS:
|
|
||||||
|
|
||||||
friend class QWaylandSurfaceView;
|
|
||||||
friend class QWaylandSurfaceInterface;
|
|
||||||
+ friend class QtWayland::Surface;
|
|
||||||
};
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
diff --git a/src/compositor/wayland_wrapper/qwlcompositor.cpp b/src/compositor/wayland_wrapper/qwlcompositor.cpp
|
|
||||||
index aa772d9..3f1a7ba 100644
|
|
||||||
--- a/src/compositor/wayland_wrapper/qwlcompositor.cpp
|
|
||||||
+++ b/src/compositor/wayland_wrapper/qwlcompositor.cpp
|
|
||||||
@@ -198,14 +198,6 @@ Compositor::~Compositor()
|
|
||||||
delete m_display;
|
|
||||||
}
|
|
||||||
|
|
||||||
-void Compositor::sendFrameCallbacks(QList<QWaylandSurface *> visibleSurfaces)
|
|
||||||
-{
|
|
||||||
- foreach (QWaylandSurface *surface, visibleSurfaces) {
|
|
||||||
- surface->handle()->sendFrameCallback();
|
|
||||||
- }
|
|
||||||
- wl_display_flush_clients(m_display->handle());
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
uint Compositor::currentTimeMsecs() const
|
|
||||||
{
|
|
||||||
return m_timer.elapsed();
|
|
||||||
@@ -272,7 +264,7 @@ void Compositor::processWaylandEvents()
|
|
||||||
|
|
||||||
void Compositor::destroySurface(Surface *surface)
|
|
||||||
{
|
|
||||||
- m_surfaces.removeOne(surface);
|
|
||||||
+ surface->removeFromOutput();
|
|
||||||
|
|
||||||
waylandCompositor()->surfaceAboutToBeDestroyed(surface->waylandSurface());
|
|
||||||
|
|
||||||
@@ -299,7 +291,7 @@ void Compositor::cleanupGraphicsResources()
|
|
||||||
void Compositor::compositor_create_surface(Resource *resource, uint32_t id)
|
|
||||||
{
|
|
||||||
QWaylandSurface *surface = new QWaylandSurface(resource->client(), id, resource->version(), m_qt_compositor);
|
|
||||||
- m_surfaces << surface->handle();
|
|
||||||
+ primaryOutput()->addSurface(surface);
|
|
||||||
//BUG: This may not be an on-screen window surface though
|
|
||||||
m_qt_compositor->surfaceCreated(surface);
|
|
||||||
}
|
|
||||||
@@ -405,18 +397,6 @@ InputDevice* Compositor::defaultInputDevice()
|
|
||||||
return m_inputDevices.last()->handle();
|
|
||||||
}
|
|
||||||
|
|
||||||
-QList<QtWayland::Surface *> Compositor::surfacesForClient(wl_client *client)
|
|
||||||
-{
|
|
||||||
- QList<QtWayland::Surface *> ret;
|
|
||||||
-
|
|
||||||
- for (int i=0; i < m_surfaces.count(); ++i) {
|
|
||||||
- if (m_surfaces.at(i)->resource()->client() == client) {
|
|
||||||
- ret.append(m_surfaces.at(i));
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- return ret;
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
void Compositor::configureTouchExtension(int flags)
|
|
||||||
{
|
|
||||||
if (m_touchExtension)
|
|
||||||
diff --git a/src/compositor/wayland_wrapper/qwlcompositor_p.h b/src/compositor/wayland_wrapper/qwlcompositor_p.h
|
|
||||||
index 85f020d..f67d39b 100644
|
|
||||||
--- a/src/compositor/wayland_wrapper/qwlcompositor_p.h
|
|
||||||
+++ b/src/compositor/wayland_wrapper/qwlcompositor_p.h
|
|
||||||
@@ -94,8 +94,6 @@ public:
|
|
||||||
~Compositor();
|
|
||||||
|
|
||||||
void init();
|
|
||||||
- void sendFrameCallbacks(QList<QWaylandSurface *> visibleSurfaces);
|
|
||||||
- void frameFinished(Surface *surface = 0);
|
|
||||||
|
|
||||||
InputDevice *defaultInputDevice();
|
|
||||||
|
|
||||||
@@ -126,8 +124,6 @@ public:
|
|
||||||
void initializeDefaultInputDevice();
|
|
||||||
void initializeWindowManagerProtocol();
|
|
||||||
|
|
||||||
- QList<Surface*> surfaces() const { return m_surfaces; }
|
|
||||||
- QList<Surface*> surfacesForClient(wl_client* client);
|
|
||||||
QWaylandCompositor *waylandCompositor() const { return m_qt_compositor; }
|
|
||||||
|
|
||||||
struct wl_display *wl_display() const { return m_display->handle(); }
|
|
||||||
@@ -193,7 +189,6 @@ protected:
|
|
||||||
DataDeviceManager *m_data_device_manager;
|
|
||||||
|
|
||||||
QElapsedTimer m_timer;
|
|
||||||
- QList<Surface *> m_surfaces;
|
|
||||||
QSet<QWaylandSurface *> m_destroyed_surfaces;
|
|
||||||
|
|
||||||
/* Render state */
|
|
||||||
diff --git a/src/compositor/wayland_wrapper/qwloutput.cpp b/src/compositor/wayland_wrapper/qwloutput.cpp
|
|
||||||
index 1659a63..da7e0a9 100644
|
|
||||||
--- a/src/compositor/wayland_wrapper/qwloutput.cpp
|
|
||||||
+++ b/src/compositor/wayland_wrapper/qwloutput.cpp
|
|
||||||
@@ -43,9 +43,12 @@
|
|
||||||
|
|
||||||
#include "qwlcompositor_p.h"
|
|
||||||
#include "qwlextendedoutput_p.h"
|
|
||||||
+#include "qwlsurface_p.h"
|
|
||||||
|
|
||||||
#include <QtGui/QWindow>
|
|
||||||
#include <QRect>
|
|
||||||
+#include <QtCompositor/QWaylandSurface>
|
|
||||||
+#include <QtCompositor/QWaylandOutput>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
@@ -246,6 +249,48 @@ OutputResource *Output::outputForClient(wl_client *client) const
|
|
||||||
return static_cast<OutputResource *>(resourceMap().value(client));
|
|
||||||
}
|
|
||||||
|
|
||||||
+void Output::frameStarted()
|
|
||||||
+{
|
|
||||||
+ Q_FOREACH (QWaylandSurface *surface, m_surfaces)
|
|
||||||
+ surface->handle()->frameStarted();
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void Output::sendFrameCallbacks(QList<QWaylandSurface *> visibleSurfaces)
|
|
||||||
+{
|
|
||||||
+ Q_FOREACH (QWaylandSurface *surface, visibleSurfaces)
|
|
||||||
+ surface->handle()->sendFrameCallback();
|
|
||||||
+ wl_display_flush_clients(m_compositor->wl_display());
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+QList<QWaylandSurface *> Output::surfacesForClient(QWaylandClient *client) const
|
|
||||||
+{
|
|
||||||
+ QList<QWaylandSurface *> result;
|
|
||||||
+
|
|
||||||
+ Q_FOREACH (QWaylandSurface *surface, m_surfaces) {
|
|
||||||
+ if (surface->client() == client)
|
|
||||||
+ result.append(result);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return result;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void Output::addSurface(QWaylandSurface *surface)
|
|
||||||
+{
|
|
||||||
+ if (surface->output() == waylandOutput())
|
|
||||||
+ return;
|
|
||||||
+ if (surface->output())
|
|
||||||
+ surface->output()->handle()->removeSurface(surface);
|
|
||||||
+
|
|
||||||
+ surface->handle()->setOutput(this);
|
|
||||||
+ m_surfaces.append(surface);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void Output::removeSurface(QWaylandSurface *surface)
|
|
||||||
+{
|
|
||||||
+ m_surfaces.removeOne(surface);
|
|
||||||
+ surface->handle()->setOutput(Q_NULLPTR);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
void Output::sendGeometryInfo()
|
|
||||||
{
|
|
||||||
Q_FOREACH (Resource *resource, resourceMap().values()) {
|
|
||||||
diff --git a/src/compositor/wayland_wrapper/qwloutput_p.h b/src/compositor/wayland_wrapper/qwloutput_p.h
|
|
||||||
index 027cc55..9247b47 100644
|
|
||||||
--- a/src/compositor/wayland_wrapper/qwloutput_p.h
|
|
||||||
+++ b/src/compositor/wayland_wrapper/qwloutput_p.h
|
|
||||||
@@ -110,6 +110,15 @@ public:
|
|
||||||
|
|
||||||
QWaylandOutput *waylandOutput() const { return m_output; }
|
|
||||||
|
|
||||||
+ void frameStarted();
|
|
||||||
+ void sendFrameCallbacks(QList<QWaylandSurface *> visibleSurfaces);
|
|
||||||
+
|
|
||||||
+ QList<QWaylandSurface *> surfaces() const { return m_surfaces; }
|
|
||||||
+ QList<QWaylandSurface *> surfacesForClient(QWaylandClient *client) const;
|
|
||||||
+
|
|
||||||
+ void addSurface(QWaylandSurface *surface);
|
|
||||||
+ void removeSurface(QWaylandSurface *surface);
|
|
||||||
+
|
|
||||||
void output_bind_resource(Resource *resource) Q_DECL_OVERRIDE;
|
|
||||||
Resource *output_allocate() Q_DECL_OVERRIDE { return new OutputResource; }
|
|
||||||
|
|
||||||
@@ -128,6 +137,7 @@ private:
|
|
||||||
QWaylandOutput::Subpixel m_subpixel;
|
|
||||||
QWaylandOutput::Transform m_transform;
|
|
||||||
int m_scaleFactor;
|
|
||||||
+ QList<QWaylandSurface *> m_surfaces;
|
|
||||||
|
|
||||||
void sendGeometryInfo();
|
|
||||||
};
|
|
||||||
diff --git a/src/compositor/wayland_wrapper/qwlsurface.cpp b/src/compositor/wayland_wrapper/qwlsurface.cpp
|
|
||||||
index a24aa7e..4333243 100644
|
|
||||||
--- a/src/compositor/wayland_wrapper/qwlsurface.cpp
|
|
||||||
+++ b/src/compositor/wayland_wrapper/qwlsurface.cpp
|
|
||||||
@@ -114,7 +114,7 @@ Surface::Surface(struct wl_client *client, uint32_t id, int version, QWaylandCom
|
|
||||||
: QtWaylandServer::wl_surface(client, id, version)
|
|
||||||
, m_compositor(compositor->handle())
|
|
||||||
, m_waylandSurface(surface)
|
|
||||||
- , m_output(m_compositor->primaryOutput()->handle())
|
|
||||||
+ , m_output(0)
|
|
||||||
, m_buffer(0)
|
|
||||||
, m_surfaceMapped(false)
|
|
||||||
, m_attacher(0)
|
|
||||||
@@ -283,6 +283,43 @@ Output *Surface::output() const
|
|
||||||
return m_output;
|
|
||||||
}
|
|
||||||
|
|
||||||
+void Surface::setOutput(Output *output)
|
|
||||||
+{
|
|
||||||
+ if (m_output == output)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ QWaylandOutput *oldOutput = m_output ? m_output->waylandOutput() : 0;
|
|
||||||
+ m_output = output;
|
|
||||||
+
|
|
||||||
+ QWaylandOutputChangedEvent event(oldOutput, m_output ? m_output->waylandOutput() : 0);
|
|
||||||
+ // TODO: Consider doing something like this:
|
|
||||||
+ //QCoreApplication::sendEvent(waylandSurface(), &event);
|
|
||||||
+ waylandSurface()->outputChangedEvent(&event);
|
|
||||||
+
|
|
||||||
+ // Send surface enter event
|
|
||||||
+ Q_FOREACH (Resource *resource, resourceMap().values()) {
|
|
||||||
+ QList<Output::Resource *> outputs = m_output->resourceMap().values();
|
|
||||||
+ for (int i = 0; i < outputs.size(); i++)
|
|
||||||
+ send_enter(resource->handle, outputs.at(i)->handle);
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+void Surface::removeFromOutput()
|
|
||||||
+{
|
|
||||||
+ if (!m_output)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ // Remove surface
|
|
||||||
+ m_output->removeSurface(this->waylandSurface());
|
|
||||||
+
|
|
||||||
+ // Send surface leave event
|
|
||||||
+ Q_FOREACH (Resource *resource, resourceMap().values()) {
|
|
||||||
+ QList<Output::Resource *> outputs = m_output->resourceMap().values();
|
|
||||||
+ for (int i = 0; i < outputs.size(); i++)
|
|
||||||
+ send_leave(resource->handle, outputs.at(i)->handle);
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
/*!
|
|
||||||
* Sets the backbuffer for this surface. The back buffer is not yet on
|
|
||||||
* screen and will become live during the next swapBuffers().
|
|
||||||
diff --git a/src/compositor/wayland_wrapper/qwlsurface_p.h b/src/compositor/wayland_wrapper/qwlsurface_p.h
|
|
||||||
index 07eb358..880114f 100644
|
|
||||||
--- a/src/compositor/wayland_wrapper/qwlsurface_p.h
|
|
||||||
+++ b/src/compositor/wayland_wrapper/qwlsurface_p.h
|
|
||||||
@@ -114,6 +114,8 @@ public:
|
|
||||||
Compositor *compositor() const;
|
|
||||||
|
|
||||||
Output *output() const;
|
|
||||||
+ void setOutput(Output *output);
|
|
||||||
+ void removeFromOutput();
|
|
||||||
|
|
||||||
QString className() const { return m_className; }
|
|
||||||
void setClassName(const QString &className);
|
|
||||||
--
|
|
||||||
1.9.3
|
|
||||||
|
|
||||||
@@ -1,701 +0,0 @@
|
|||||||
From 6337760ad2693756000625d17fcb89e2a3c22119 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
|
|
||||||
Date: Sat, 3 Jan 2015 17:03:13 +0100
|
|
||||||
Subject: [PATCH 2/3] Remove output extension
|
|
||||||
|
|
||||||
This protocol is empty now and is no longer used.
|
|
||||||
|
|
||||||
Change-Id: I45e79fb86a67b4cebdc307170218fa039b2aa27f
|
|
||||||
---
|
|
||||||
src/client/client.pro | 3 -
|
|
||||||
src/client/qwaylanddisplay.cpp | 6 --
|
|
||||||
src/client/qwaylanddisplay_p.h | 2 -
|
|
||||||
src/client/qwaylandextendedoutput.cpp | 61 ---------------
|
|
||||||
src/client/qwaylandextendedoutput_p.h | 66 ----------------
|
|
||||||
src/client/qwaylandscreen.cpp | 16 ----
|
|
||||||
src/client/qwaylandscreen_p.h | 5 --
|
|
||||||
src/compositor/compositor_api/qwaylandcompositor.h | 17 ++---
|
|
||||||
src/compositor/wayland_wrapper/qwlcompositor.cpp | 5 --
|
|
||||||
src/compositor/wayland_wrapper/qwlcompositor_p.h | 2 -
|
|
||||||
.../wayland_wrapper/qwlextendedoutput.cpp | 71 ------------------
|
|
||||||
.../wayland_wrapper/qwlextendedoutput_p.h | 87 ----------------------
|
|
||||||
src/compositor/wayland_wrapper/qwloutput.cpp | 1 -
|
|
||||||
src/compositor/wayland_wrapper/qwloutput_p.h | 4 +-
|
|
||||||
src/compositor/wayland_wrapper/wayland_wrapper.pri | 3 -
|
|
||||||
src/extensions/output-extension.xml | 51 -------------
|
|
||||||
16 files changed, 9 insertions(+), 391 deletions(-)
|
|
||||||
delete mode 100644 src/client/qwaylandextendedoutput.cpp
|
|
||||||
delete mode 100644 src/client/qwaylandextendedoutput_p.h
|
|
||||||
delete mode 100644 src/compositor/wayland_wrapper/qwlextendedoutput.cpp
|
|
||||||
delete mode 100644 src/compositor/wayland_wrapper/qwlextendedoutput_p.h
|
|
||||||
delete mode 100644 src/extensions/output-extension.xml
|
|
||||||
|
|
||||||
diff --git a/src/client/client.pro b/src/client/client.pro
|
|
||||||
index ef3cff0..4c398fe 100644
|
|
||||||
--- a/src/client/client.pro
|
|
||||||
+++ b/src/client/client.pro
|
|
||||||
@@ -41,7 +41,6 @@ WAYLANDCLIENTSOURCES += \
|
|
||||||
../3rdparty/protocol/wayland.xml \
|
|
||||||
../extensions/surface-extension.xml \
|
|
||||||
../extensions/sub-surface-extension.xml \
|
|
||||||
- ../extensions/output-extension.xml \
|
|
||||||
../extensions/touch-extension.xml \
|
|
||||||
../extensions/qtkey-extension.xml \
|
|
||||||
../extensions/windowmanager.xml \
|
|
||||||
@@ -66,7 +65,6 @@ SOURCES += qwaylandintegration.cpp \
|
|
||||||
qwaylandwlshellsurface.cpp \
|
|
||||||
qwaylandxdgshell.cpp \
|
|
||||||
qwaylandxdgsurface.cpp \
|
|
||||||
- qwaylandextendedoutput.cpp \
|
|
||||||
qwaylandextendedsurface.cpp \
|
|
||||||
qwaylandsubsurface.cpp \
|
|
||||||
qwaylandtouch.cpp \
|
|
||||||
@@ -99,7 +97,6 @@ HEADERS += qwaylandintegration_p.h \
|
|
||||||
qwaylandwlshellsurface_p.h \
|
|
||||||
qwaylandxdgshell_p.h \
|
|
||||||
qwaylandxdgsurface_p.h \
|
|
||||||
- qwaylandextendedoutput_p.h \
|
|
||||||
qwaylandextendedsurface_p.h \
|
|
||||||
qwaylandsubsurface_p.h \
|
|
||||||
qwaylandtouch_p.h \
|
|
||||||
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp
|
|
||||||
index ea7fe1a..d4845ec 100644
|
|
||||||
--- a/src/client/qwaylanddisplay.cpp
|
|
||||||
+++ b/src/client/qwaylanddisplay.cpp
|
|
||||||
@@ -58,7 +58,6 @@
|
|
||||||
#include "qwaylandshellintegration_p.h"
|
|
||||||
#include "qwaylandclientbufferintegration_p.h"
|
|
||||||
|
|
||||||
-#include "qwaylandextendedoutput_p.h"
|
|
||||||
#include "qwaylandextendedsurface_p.h"
|
|
||||||
#include "qwaylandsubsurface_p.h"
|
|
||||||
#include "qwaylandtouch_p.h"
|
|
||||||
@@ -135,7 +134,6 @@ QWaylandDisplay::QWaylandDisplay(QWaylandIntegration *waylandIntegration)
|
|
||||||
, mDndSelectionHandler(0)
|
|
||||||
, mWindowExtension(0)
|
|
||||||
, mSubSurfaceExtension(0)
|
|
||||||
- , mOutputExtension(0)
|
|
||||||
, mTouchExtension(0)
|
|
||||||
, mQtKeyExtension(0)
|
|
||||||
, mTextInputManager(0)
|
|
||||||
@@ -260,10 +258,6 @@ void QWaylandDisplay::registry_global(uint32_t id, const QString &interface, uin
|
|
||||||
mInputDevices.append(inputDevice);
|
|
||||||
} else if (interface == QStringLiteral("wl_data_device_manager")) {
|
|
||||||
mDndSelectionHandler.reset(new QWaylandDataDeviceManager(this, id));
|
|
||||||
- } else if (interface == QStringLiteral("qt_output_extension")) {
|
|
||||||
- mOutputExtension.reset(new QtWayland::qt_output_extension(registry, id, 1));
|
|
||||||
- foreach (QPlatformScreen *screen, screens())
|
|
||||||
- static_cast<QWaylandScreen *>(screen)->createExtendedOutput();
|
|
||||||
} else if (interface == QStringLiteral("qt_surface_extension")) {
|
|
||||||
mWindowExtension.reset(new QtWayland::qt_surface_extension(registry, id, 1));
|
|
||||||
} else if (interface == QStringLiteral("qt_sub_surface_extension")) {
|
|
||||||
diff --git a/src/client/qwaylanddisplay_p.h b/src/client/qwaylanddisplay_p.h
|
|
||||||
index 9d4413f..e478e17 100644
|
|
||||||
--- a/src/client/qwaylanddisplay_p.h
|
|
||||||
+++ b/src/client/qwaylanddisplay_p.h
|
|
||||||
@@ -136,7 +136,6 @@ public:
|
|
||||||
|
|
||||||
QtWayland::qt_surface_extension *windowExtension() const { return mWindowExtension.data(); }
|
|
||||||
QtWayland::qt_sub_surface_extension *subSurfaceExtension() const { return mSubSurfaceExtension.data(); }
|
|
||||||
- QtWayland::qt_output_extension *outputExtension() const { return mOutputExtension.data(); }
|
|
||||||
QWaylandTouchExtension *touchExtension() const { return mTouchExtension.data(); }
|
|
||||||
QtWayland::wl_text_input_manager *textInputManager() const { return mTextInputManager.data(); }
|
|
||||||
QWaylandHardwareIntegration *hardwareIntegration() const { return mHardwareIntegration.data(); }
|
|
||||||
@@ -192,7 +191,6 @@ private:
|
|
||||||
QScopedPointer<QWaylandDataDeviceManager> mDndSelectionHandler;
|
|
||||||
QScopedPointer<QtWayland::qt_surface_extension> mWindowExtension;
|
|
||||||
QScopedPointer<QtWayland::qt_sub_surface_extension> mSubSurfaceExtension;
|
|
||||||
- QScopedPointer<QtWayland::qt_output_extension> mOutputExtension;
|
|
||||||
QScopedPointer<QWaylandTouchExtension> mTouchExtension;
|
|
||||||
QScopedPointer<QWaylandQtKeyExtension> mQtKeyExtension;
|
|
||||||
QScopedPointer<QWaylandWindowManagerIntegration> mWindowManagerIntegration;
|
|
||||||
diff --git a/src/client/qwaylandextendedoutput.cpp b/src/client/qwaylandextendedoutput.cpp
|
|
||||||
deleted file mode 100644
|
|
||||||
index 26fba99..0000000
|
|
||||||
--- a/src/client/qwaylandextendedoutput.cpp
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,61 +0,0 @@
|
|
||||||
-/****************************************************************************
|
|
||||||
-**
|
|
||||||
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
|
|
||||||
-** Contact: http://www.qt-project.org/legal
|
|
||||||
-**
|
|
||||||
-** This file is part of the plugins of the Qt Toolkit.
|
|
||||||
-**
|
|
||||||
-** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
-** Commercial License Usage
|
|
||||||
-** Licensees holding valid commercial Qt licenses may use this file in
|
|
||||||
-** accordance with the commercial license agreement provided with the
|
|
||||||
-** Software or, alternatively, in accordance with the terms contained in
|
|
||||||
-** a written agreement between you and Digia. For licensing terms and
|
|
||||||
-** conditions see http://qt.digia.com/licensing. For further information
|
|
||||||
-** use the contact form at http://qt.digia.com/contact-us.
|
|
||||||
-**
|
|
||||||
-** GNU Lesser General Public License Usage
|
|
||||||
-** Alternatively, this file may be used under the terms of the GNU Lesser
|
|
||||||
-** General Public License version 2.1 as published by the Free Software
|
|
||||||
-** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
-** packaging of this file. Please review the following information to
|
|
||||||
-** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
-**
|
|
||||||
-** In addition, as a special exception, Digia gives you certain additional
|
|
||||||
-** rights. These rights are described in the Digia Qt LGPL Exception
|
|
||||||
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
||||||
-**
|
|
||||||
-** GNU General Public License Usage
|
|
||||||
-** Alternatively, this file may be used under the terms of the GNU
|
|
||||||
-** General Public License version 3.0 as published by the Free Software
|
|
||||||
-** Foundation and appearing in the file LICENSE.GPL included in the
|
|
||||||
-** packaging of this file. Please review the following information to
|
|
||||||
-** ensure the GNU General Public License version 3.0 requirements will be
|
|
||||||
-** met: http://www.gnu.org/copyleft/gpl.html.
|
|
||||||
-**
|
|
||||||
-**
|
|
||||||
-** $QT_END_LICENSE$
|
|
||||||
-**
|
|
||||||
-****************************************************************************/
|
|
||||||
-
|
|
||||||
-#include "qwaylandextendedoutput_p.h"
|
|
||||||
-
|
|
||||||
-#include "qwaylandscreen_p.h"
|
|
||||||
-
|
|
||||||
-#include <qpa/qwindowsysteminterface.h>
|
|
||||||
-
|
|
||||||
-#include <QtCore/QDebug>
|
|
||||||
-
|
|
||||||
-QT_BEGIN_NAMESPACE
|
|
||||||
-
|
|
||||||
-namespace QtWaylandClient {
|
|
||||||
-
|
|
||||||
-QWaylandExtendedOutput::QWaylandExtendedOutput(QWaylandScreen *screen, ::qt_extended_output *extended_output)
|
|
||||||
- : QtWayland::qt_extended_output(extended_output)
|
|
||||||
-{
|
|
||||||
- Q_UNUSED(screen);
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-}
|
|
||||||
-QT_END_NAMESPACE
|
|
||||||
diff --git a/src/client/qwaylandextendedoutput_p.h b/src/client/qwaylandextendedoutput_p.h
|
|
||||||
deleted file mode 100644
|
|
||||||
index 0ac24d6..0000000
|
|
||||||
--- a/src/client/qwaylandextendedoutput_p.h
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,66 +0,0 @@
|
|
||||||
-/****************************************************************************
|
|
||||||
-**
|
|
||||||
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
|
|
||||||
-** Contact: http://www.qt-project.org/legal
|
|
||||||
-**
|
|
||||||
-** This file is part of the plugins of the Qt Toolkit.
|
|
||||||
-**
|
|
||||||
-** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
-** Commercial License Usage
|
|
||||||
-** Licensees holding valid commercial Qt licenses may use this file in
|
|
||||||
-** accordance with the commercial license agreement provided with the
|
|
||||||
-** Software or, alternatively, in accordance with the terms contained in
|
|
||||||
-** a written agreement between you and Digia. For licensing terms and
|
|
||||||
-** conditions see http://qt.digia.com/licensing. For further information
|
|
||||||
-** use the contact form at http://qt.digia.com/contact-us.
|
|
||||||
-**
|
|
||||||
-** GNU Lesser General Public License Usage
|
|
||||||
-** Alternatively, this file may be used under the terms of the GNU Lesser
|
|
||||||
-** General Public License version 2.1 as published by the Free Software
|
|
||||||
-** Foundation and appearing in the file LICENSE.LGPL included in the
|
|
||||||
-** packaging of this file. Please review the following information to
|
|
||||||
-** ensure the GNU Lesser General Public License version 2.1 requirements
|
|
||||||
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
-**
|
|
||||||
-** In addition, as a special exception, Digia gives you certain additional
|
|
||||||
-** rights. These rights are described in the Digia Qt LGPL Exception
|
|
||||||
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
||||||
-**
|
|
||||||
-** GNU General Public License Usage
|
|
||||||
-** Alternatively, this file may be used under the terms of the GNU
|
|
||||||
-** General Public License version 3.0 as published by the Free Software
|
|
||||||
-** Foundation and appearing in the file LICENSE.GPL included in the
|
|
||||||
-** packaging of this file. Please review the following information to
|
|
||||||
-** ensure the GNU General Public License version 3.0 requirements will be
|
|
||||||
-** met: http://www.gnu.org/copyleft/gpl.html.
|
|
||||||
-**
|
|
||||||
-**
|
|
||||||
-** $QT_END_LICENSE$
|
|
||||||
-**
|
|
||||||
-****************************************************************************/
|
|
||||||
-
|
|
||||||
-#ifndef QWAYLANDEXTENDEDOUTPUT_H
|
|
||||||
-#define QWAYLANDEXTENDEDOUTPUT_H
|
|
||||||
-
|
|
||||||
-#include <QtWaylandClient/private/qwayland-output-extension.h>
|
|
||||||
-#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
|
||||||
-
|
|
||||||
-QT_BEGIN_NAMESPACE
|
|
||||||
-
|
|
||||||
-namespace QtWaylandClient {
|
|
||||||
-
|
|
||||||
-class QWaylandDisplay;
|
|
||||||
-class QWaylandScreen;
|
|
||||||
-class QWaylandExtendedOutput;
|
|
||||||
-
|
|
||||||
-class Q_WAYLAND_CLIENT_EXPORT QWaylandExtendedOutput : public QtWayland::qt_extended_output
|
|
||||||
-{
|
|
||||||
-public:
|
|
||||||
- QWaylandExtendedOutput(QWaylandScreen *screen, struct ::qt_extended_output *extended_output);
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-QT_END_NAMESPACE
|
|
||||||
-
|
|
||||||
-#endif // QWAYLANDEXTENDEDOUTPUT_H
|
|
||||||
diff --git a/src/client/qwaylandscreen.cpp b/src/client/qwaylandscreen.cpp
|
|
||||||
index a1aff8d..7caebb7 100644
|
|
||||||
--- a/src/client/qwaylandscreen.cpp
|
|
||||||
+++ b/src/client/qwaylandscreen.cpp
|
|
||||||
@@ -43,7 +43,6 @@
|
|
||||||
|
|
||||||
#include "qwaylanddisplay_p.h"
|
|
||||||
#include "qwaylandcursor_p.h"
|
|
||||||
-#include "qwaylandextendedoutput_p.h"
|
|
||||||
#include "qwaylandwindow_p.h"
|
|
||||||
|
|
||||||
#include <QtGui/QGuiApplication>
|
|
||||||
@@ -60,7 +59,6 @@ QWaylandScreen::QWaylandScreen(QWaylandDisplay *waylandDisplay, int version, uin
|
|
||||||
, QtWayland::wl_output(waylandDisplay->wl_registry(), id, qMin(version, 2))
|
|
||||||
, m_outputId(id)
|
|
||||||
, mWaylandDisplay(waylandDisplay)
|
|
||||||
- , mExtendedOutput(0)
|
|
||||||
, mScale(1)
|
|
||||||
, mDepth(32)
|
|
||||||
, mRefreshRate(60000)
|
|
||||||
@@ -70,8 +68,6 @@ QWaylandScreen::QWaylandScreen(QWaylandDisplay *waylandDisplay, int version, uin
|
|
||||||
, m_orientation(Qt::PrimaryOrientation)
|
|
||||||
, mWaylandCursor(new QWaylandCursor(this))
|
|
||||||
{
|
|
||||||
- // handle case of output extension global being sent after outputs
|
|
||||||
- createExtendedOutput();
|
|
||||||
}
|
|
||||||
|
|
||||||
QWaylandScreen::~QWaylandScreen()
|
|
||||||
@@ -152,18 +148,6 @@ QPlatformCursor *QWaylandScreen::cursor() const
|
|
||||||
return mWaylandCursor;
|
|
||||||
}
|
|
||||||
|
|
||||||
-QWaylandExtendedOutput *QWaylandScreen::extendedOutput() const
|
|
||||||
-{
|
|
||||||
- return mExtendedOutput;
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-void QWaylandScreen::createExtendedOutput()
|
|
||||||
-{
|
|
||||||
- QtWayland::qt_output_extension *extension = mWaylandDisplay->outputExtension();
|
|
||||||
- if (!mExtendedOutput && extension)
|
|
||||||
- mExtendedOutput = new QWaylandExtendedOutput(this, extension->get_extended_output(output()));
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
QWaylandScreen * QWaylandScreen::waylandScreenFromWindow(QWindow *window)
|
|
||||||
{
|
|
||||||
QPlatformScreen *platformScreen = QPlatformScreen::platformScreenForWindow(window);
|
|
||||||
diff --git a/src/client/qwaylandscreen_p.h b/src/client/qwaylandscreen_p.h
|
|
||||||
index c337d9b..3971c8a 100644
|
|
||||||
--- a/src/client/qwaylandscreen_p.h
|
|
||||||
+++ b/src/client/qwaylandscreen_p.h
|
|
||||||
@@ -53,7 +53,6 @@ namespace QtWaylandClient {
|
|
||||||
|
|
||||||
class QWaylandDisplay;
|
|
||||||
class QWaylandCursor;
|
|
||||||
-class QWaylandExtendedOutput;
|
|
||||||
|
|
||||||
class Q_WAYLAND_CLIENT_EXPORT QWaylandScreen : public QPlatformScreen, QtWayland::wl_output
|
|
||||||
{
|
|
||||||
@@ -86,9 +85,6 @@ public:
|
|
||||||
uint32_t outputId() const { return m_outputId; }
|
|
||||||
::wl_output *output() { return object(); }
|
|
||||||
|
|
||||||
- QWaylandExtendedOutput *extendedOutput() const;
|
|
||||||
- void createExtendedOutput();
|
|
||||||
-
|
|
||||||
static QWaylandScreen *waylandScreenFromWindow(QWindow *window);
|
|
||||||
|
|
||||||
private:
|
|
||||||
@@ -104,7 +100,6 @@ private:
|
|
||||||
|
|
||||||
int m_outputId;
|
|
||||||
QWaylandDisplay *mWaylandDisplay;
|
|
||||||
- QWaylandExtendedOutput *mExtendedOutput;
|
|
||||||
QRect mGeometry;
|
|
||||||
int mScale;
|
|
||||||
int mDepth;
|
|
||||||
diff --git a/src/compositor/compositor_api/qwaylandcompositor.h b/src/compositor/compositor_api/qwaylandcompositor.h
|
|
||||||
index 1e482eb..86ca61a 100644
|
|
||||||
--- a/src/compositor/compositor_api/qwaylandcompositor.h
|
|
||||||
+++ b/src/compositor/compositor_api/qwaylandcompositor.h
|
|
||||||
@@ -75,15 +75,14 @@ class Q_COMPOSITOR_EXPORT QWaylandCompositor
|
|
||||||
public:
|
|
||||||
enum ExtensionFlag {
|
|
||||||
WindowManagerExtension = 0x01,
|
|
||||||
- OutputExtension = 0x02,
|
|
||||||
- SurfaceExtension = 0x04,
|
|
||||||
- QtKeyExtension = 0x08,
|
|
||||||
- TouchExtension = 0x10,
|
|
||||||
- SubSurfaceExtension = 0x20,
|
|
||||||
- TextInputExtension = 0x40,
|
|
||||||
- HardwareIntegrationExtension = 0x80,
|
|
||||||
-
|
|
||||||
- DefaultExtensions = WindowManagerExtension | OutputExtension | SurfaceExtension | QtKeyExtension | TouchExtension | HardwareIntegrationExtension
|
|
||||||
+ SurfaceExtension = 0x02,
|
|
||||||
+ QtKeyExtension = 0x04,
|
|
||||||
+ TouchExtension = 0x08,
|
|
||||||
+ SubSurfaceExtension = 0x10,
|
|
||||||
+ TextInputExtension = 0x20,
|
|
||||||
+ HardwareIntegrationExtension = 0x40,
|
|
||||||
+
|
|
||||||
+ DefaultExtensions = WindowManagerExtension | SurfaceExtension | QtKeyExtension | TouchExtension | HardwareIntegrationExtension
|
|
||||||
};
|
|
||||||
Q_DECLARE_FLAGS(ExtensionFlags, ExtensionFlag)
|
|
||||||
|
|
||||||
diff --git a/src/compositor/wayland_wrapper/qwlcompositor.cpp b/src/compositor/wayland_wrapper/qwlcompositor.cpp
|
|
||||||
index 3f1a7ba..be4845d 100644
|
|
||||||
--- a/src/compositor/wayland_wrapper/qwlcompositor.cpp
|
|
||||||
+++ b/src/compositor/wayland_wrapper/qwlcompositor.cpp
|
|
||||||
@@ -49,7 +49,6 @@
|
|
||||||
#include "qwaylandcompositor.h"
|
|
||||||
#include "qwldatadevicemanager_p.h"
|
|
||||||
#include "qwldatadevice_p.h"
|
|
||||||
-#include "qwlextendedoutput_p.h"
|
|
||||||
#include "qwlextendedsurface_p.h"
|
|
||||||
#include "qwlsubsurface_p.h"
|
|
||||||
#include "qwlshellsurface_p.h"
|
|
||||||
@@ -121,7 +120,6 @@ Compositor::Compositor(QWaylandCompositor *qt_compositor, QWaylandCompositor::Ex
|
|
||||||
, m_server_buffer_integration(0)
|
|
||||||
#endif
|
|
||||||
, m_windowManagerIntegration(0)
|
|
||||||
- , m_outputExtension(0)
|
|
||||||
, m_surfaceExtension(0)
|
|
||||||
, m_subSurfaceExtension(0)
|
|
||||||
, m_touchExtension(0)
|
|
||||||
@@ -185,7 +183,6 @@ Compositor::~Compositor()
|
|
||||||
|
|
||||||
qDeleteAll(m_outputs);
|
|
||||||
|
|
||||||
- delete m_outputExtension;
|
|
||||||
delete m_surfaceExtension;
|
|
||||||
delete m_subSurfaceExtension;
|
|
||||||
delete m_touchExtension;
|
|
||||||
@@ -349,8 +346,6 @@ void Compositor::initializeHardwareIntegration()
|
|
||||||
|
|
||||||
void Compositor::initializeExtensions()
|
|
||||||
{
|
|
||||||
- if (m_extensions & QWaylandCompositor::OutputExtension)
|
|
||||||
- m_outputExtension = new OutputExtensionGlobal(this);
|
|
||||||
if (m_extensions & QWaylandCompositor::SurfaceExtension)
|
|
||||||
m_surfaceExtension = new SurfaceExtensionGlobal(this);
|
|
||||||
if (m_extensions & QWaylandCompositor::SubSurfaceExtension)
|
|
||||||
diff --git a/src/compositor/wayland_wrapper/qwlcompositor_p.h b/src/compositor/wayland_wrapper/qwlcompositor_p.h
|
|
||||||
index f67d39b..bb4fa7d 100644
|
|
||||||
--- a/src/compositor/wayland_wrapper/qwlcompositor_p.h
|
|
||||||
+++ b/src/compositor/wayland_wrapper/qwlcompositor_p.h
|
|
||||||
@@ -74,7 +74,6 @@ class SurfaceBuffer;
|
|
||||||
class InputDevice;
|
|
||||||
class DataDeviceManager;
|
|
||||||
class OutputGlobal;
|
|
||||||
-class OutputExtensionGlobal;
|
|
||||||
class SurfaceExtensionGlobal;
|
|
||||||
class SubSurfaceExtensionGlobal;
|
|
||||||
class TouchExtensionGlobal;
|
|
||||||
@@ -210,7 +209,6 @@ protected:
|
|
||||||
//extensions
|
|
||||||
WindowManagerServerIntegration *m_windowManagerIntegration;
|
|
||||||
|
|
||||||
- OutputExtensionGlobal *m_outputExtension;
|
|
||||||
SurfaceExtensionGlobal *m_surfaceExtension;
|
|
||||||
SubSurfaceExtensionGlobal *m_subSurfaceExtension;
|
|
||||||
TouchExtensionGlobal *m_touchExtension;
|
|
||||||
diff --git a/src/compositor/wayland_wrapper/qwlextendedoutput.cpp b/src/compositor/wayland_wrapper/qwlextendedoutput.cpp
|
|
||||||
deleted file mode 100644
|
|
||||||
index edb4f55..0000000
|
|
||||||
--- a/src/compositor/wayland_wrapper/qwlextendedoutput.cpp
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,71 +0,0 @@
|
|
||||||
-/****************************************************************************
|
|
||||||
-**
|
|
||||||
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
|
|
||||||
-** Contact: http://www.qt-project.org/legal
|
|
||||||
-**
|
|
||||||
-** This file is part of the Qt Compositor.
|
|
||||||
-**
|
|
||||||
-** $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 Digia Plc and its Subsidiary(-ies) 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 "qwlextendedoutput_p.h"
|
|
||||||
-
|
|
||||||
-#include "qwlcompositor_p.h"
|
|
||||||
-#include "qwlsurface_p.h"
|
|
||||||
-#include "qwloutput_p.h"
|
|
||||||
-
|
|
||||||
-QT_BEGIN_NAMESPACE
|
|
||||||
-
|
|
||||||
-namespace QtWayland {
|
|
||||||
-
|
|
||||||
-OutputExtensionGlobal::OutputExtensionGlobal(Compositor *compositor)
|
|
||||||
- : QtWaylandServer::qt_output_extension(compositor->wl_display(), 1)
|
|
||||||
- , m_compositor(compositor)
|
|
||||||
-{
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-void OutputExtensionGlobal::output_extension_get_extended_output(qt_output_extension::Resource *resource, uint32_t id, wl_resource *output_resource)
|
|
||||||
-{
|
|
||||||
- OutputResource *output = static_cast<OutputResource *>(Output::Resource::fromResource(output_resource));
|
|
||||||
- Q_ASSERT(output->extendedOutput == 0);
|
|
||||||
-
|
|
||||||
- ExtendedOutput *extendedOutput = static_cast<ExtendedOutput *>(qt_extended_output::add(resource->client(), id));
|
|
||||||
-
|
|
||||||
- Q_ASSERT(!output->extendedOutput);
|
|
||||||
- output->extendedOutput = extendedOutput;
|
|
||||||
- extendedOutput->output = output;
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-QT_END_NAMESPACE
|
|
||||||
diff --git a/src/compositor/wayland_wrapper/qwlextendedoutput_p.h b/src/compositor/wayland_wrapper/qwlextendedoutput_p.h
|
|
||||||
deleted file mode 100644
|
|
||||||
index f0772e1..0000000
|
|
||||||
--- a/src/compositor/wayland_wrapper/qwlextendedoutput_p.h
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,87 +0,0 @@
|
|
||||||
-/****************************************************************************
|
|
||||||
-**
|
|
||||||
-** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
|
|
||||||
-** Contact: http://www.qt-project.org/legal
|
|
||||||
-**
|
|
||||||
-** This file is part of the Qt Compositor.
|
|
||||||
-**
|
|
||||||
-** $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 Digia Plc and its Subsidiary(-ies) 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$
|
|
||||||
-**
|
|
||||||
-****************************************************************************/
|
|
||||||
-
|
|
||||||
-#ifndef WLEXTENDEDOUTPUT_H
|
|
||||||
-#define WLEXTENDEDOUTPUT_H
|
|
||||||
-
|
|
||||||
-#include "wayland-server.h"
|
|
||||||
-
|
|
||||||
-#include <QtCompositor/qwaylandexport.h>
|
|
||||||
-
|
|
||||||
-#include <QtCore/qnamespace.h>
|
|
||||||
-
|
|
||||||
-#include <QtCompositor/private/qwayland-server-output-extension.h>
|
|
||||||
-
|
|
||||||
-QT_BEGIN_NAMESPACE
|
|
||||||
-
|
|
||||||
-namespace QtWayland {
|
|
||||||
-
|
|
||||||
-class Compositor;
|
|
||||||
-class OutputResource;
|
|
||||||
-
|
|
||||||
-class ExtendedOutput : public QtWaylandServer::qt_extended_output::Resource
|
|
||||||
-{
|
|
||||||
-public:
|
|
||||||
- ExtendedOutput() : output(0) {}
|
|
||||||
-
|
|
||||||
- OutputResource *output;
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-class OutputExtensionGlobal : public QtWaylandServer::qt_output_extension, public QtWaylandServer::qt_extended_output
|
|
||||||
-{
|
|
||||||
-public:
|
|
||||||
- OutputExtensionGlobal(Compositor *compositor);
|
|
||||||
-
|
|
||||||
-private:
|
|
||||||
- Compositor *m_compositor;
|
|
||||||
-
|
|
||||||
- qt_extended_output::Resource *extended_output_allocate() Q_DECL_OVERRIDE { return new ExtendedOutput; }
|
|
||||||
-
|
|
||||||
- void output_extension_get_extended_output(qt_output_extension::Resource *resource,
|
|
||||||
- uint32_t id,
|
|
||||||
- struct wl_resource *output_resource) Q_DECL_OVERRIDE;
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-
|
|
||||||
-}
|
|
||||||
-
|
|
||||||
-QT_END_NAMESPACE
|
|
||||||
-
|
|
||||||
-#endif // WLEXTENDEDOUTPUT_H
|
|
||||||
diff --git a/src/compositor/wayland_wrapper/qwloutput.cpp b/src/compositor/wayland_wrapper/qwloutput.cpp
|
|
||||||
index da7e0a9..2775898 100644
|
|
||||||
--- a/src/compositor/wayland_wrapper/qwloutput.cpp
|
|
||||||
+++ b/src/compositor/wayland_wrapper/qwloutput.cpp
|
|
||||||
@@ -42,7 +42,6 @@
|
|
||||||
#include "qwloutput_p.h"
|
|
||||||
|
|
||||||
#include "qwlcompositor_p.h"
|
|
||||||
-#include "qwlextendedoutput_p.h"
|
|
||||||
#include "qwlsurface_p.h"
|
|
||||||
|
|
||||||
#include <QtGui/QWindow>
|
|
||||||
diff --git a/src/compositor/wayland_wrapper/qwloutput_p.h b/src/compositor/wayland_wrapper/qwloutput_p.h
|
|
||||||
index 9247b47..828544b 100644
|
|
||||||
--- a/src/compositor/wayland_wrapper/qwloutput_p.h
|
|
||||||
+++ b/src/compositor/wayland_wrapper/qwloutput_p.h
|
|
||||||
@@ -57,12 +57,10 @@ class QWindow;
|
|
||||||
namespace QtWayland {
|
|
||||||
|
|
||||||
class Compositor;
|
|
||||||
-class ExtendedOutput;
|
|
||||||
|
|
||||||
struct OutputResource : public QtWaylandServer::wl_output::Resource
|
|
||||||
{
|
|
||||||
- OutputResource() : extendedOutput(0) {}
|
|
||||||
- ExtendedOutput *extendedOutput;
|
|
||||||
+ OutputResource() {}
|
|
||||||
};
|
|
||||||
|
|
||||||
class Output : public QtWaylandServer::wl_output
|
|
||||||
diff --git a/src/compositor/wayland_wrapper/wayland_wrapper.pri b/src/compositor/wayland_wrapper/wayland_wrapper.pri
|
|
||||||
index ac34ae2..d70facd 100644
|
|
||||||
--- a/src/compositor/wayland_wrapper/wayland_wrapper.pri
|
|
||||||
+++ b/src/compositor/wayland_wrapper/wayland_wrapper.pri
|
|
||||||
@@ -2,7 +2,6 @@ CONFIG += wayland-scanner
|
|
||||||
WAYLANDSERVERSOURCES += \
|
|
||||||
../extensions/surface-extension.xml \
|
|
||||||
../extensions/sub-surface-extension.xml \
|
|
||||||
- ../extensions/output-extension.xml \
|
|
||||||
../extensions/touch-extension.xml \
|
|
||||||
../extensions/qtkey-extension.xml \
|
|
||||||
../extensions/windowmanager.xml \
|
|
||||||
@@ -17,7 +16,6 @@ HEADERS += \
|
|
||||||
wayland_wrapper/qwldataoffer_p.h \
|
|
||||||
wayland_wrapper/qwldatasource_p.h \
|
|
||||||
wayland_wrapper/qwldisplay_p.h \
|
|
||||||
- wayland_wrapper/qwlextendedoutput_p.h \
|
|
||||||
wayland_wrapper/qwlextendedsurface_p.h \
|
|
||||||
wayland_wrapper/qwlinputdevice_p.h \
|
|
||||||
wayland_wrapper/qwlinputmethod_p.h \
|
|
||||||
@@ -46,7 +44,6 @@ SOURCES += \
|
|
||||||
wayland_wrapper/qwldataoffer.cpp \
|
|
||||||
wayland_wrapper/qwldatasource.cpp \
|
|
||||||
wayland_wrapper/qwldisplay.cpp \
|
|
||||||
- wayland_wrapper/qwlextendedoutput.cpp \
|
|
||||||
wayland_wrapper/qwlextendedsurface.cpp \
|
|
||||||
wayland_wrapper/qwlinputdevice.cpp \
|
|
||||||
wayland_wrapper/qwlinputmethod.cpp \
|
|
||||||
diff --git a/src/extensions/output-extension.xml b/src/extensions/output-extension.xml
|
|
||||||
deleted file mode 100644
|
|
||||||
index 0a7f11a..0000000
|
|
||||||
--- a/src/extensions/output-extension.xml
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,51 +0,0 @@
|
|
||||||
-<protocol name="output_extension">
|
|
||||||
-
|
|
||||||
- <copyright>
|
|
||||||
- Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
|
|
||||||
- Contact: http://www.qt-project.org/legal
|
|
||||||
-
|
|
||||||
- This file is part of the plugins 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 Digia Plc and its Subsidiary(-ies) 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$
|
|
||||||
- </copyright>
|
|
||||||
-
|
|
||||||
- <interface name="qt_output_extension" version="1">
|
|
||||||
- <request name="get_extended_output">
|
|
||||||
- <arg name="id" type="new_id" interface="qt_extended_output"/>
|
|
||||||
- <arg name="output" type="object" interface="wl_output"/>
|
|
||||||
- </request>
|
|
||||||
- </interface>
|
|
||||||
-
|
|
||||||
- <interface name="qt_extended_output" version="1">
|
|
||||||
-
|
|
||||||
- </interface>
|
|
||||||
-</protocol>
|
|
||||||
--
|
|
||||||
1.9.3
|
|
||||||
|
|
||||||
@@ -1,309 +0,0 @@
|
|||||||
From 13e31387ff88f159d49c1577229f8752fa140c27 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
|
|
||||||
Date: Sun, 11 Jan 2015 11:14:58 +0100
|
|
||||||
Subject: [PATCH 3/3] Update wayland.xml to 1.6
|
|
||||||
|
|
||||||
Change-Id: I89b1dd4f6b6f03f54a9126dd5f67b0cdc9a006ad
|
|
||||||
---
|
|
||||||
README | 2 +-
|
|
||||||
src/3rdparty/protocol/wayland.xml | 124 +++++++++++++++++-----
|
|
||||||
src/client/qwaylandinputdevice.cpp | 4 +-
|
|
||||||
src/compositor/wayland_wrapper/qwlinputdevice.cpp | 2 +-
|
|
||||||
4 files changed, 100 insertions(+), 32 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/README b/README
|
|
||||||
index f260897..2e8a1d3 100644
|
|
||||||
--- a/README
|
|
||||||
+++ b/README
|
|
||||||
@@ -20,7 +20,7 @@ doubt, run git clean -f -d -x.
|
|
||||||
|
|
||||||
To build the QtWayland module you need the external dependencies:
|
|
||||||
xkbcommon 0.2.0 - http://xkbcommon.org/
|
|
||||||
-wayland 1.2.0 - http://wayland.freedesktop.org/
|
|
||||||
+wayland 1.6.0 - http://wayland.freedesktop.org/
|
|
||||||
|
|
||||||
QtCompositor supports loading client buffer integrations that don't use the
|
|
||||||
wayland-egl interfaces. These client buffer integrations are picked up by
|
|
||||||
diff --git a/src/3rdparty/protocol/wayland.xml b/src/3rdparty/protocol/wayland.xml
|
|
||||||
index bf6acd1..bb457bc 100644
|
|
||||||
--- a/src/3rdparty/protocol/wayland.xml
|
|
||||||
+++ b/src/3rdparty/protocol/wayland.xml
|
|
||||||
@@ -246,7 +246,8 @@
|
|
||||||
<description summary="change the size of the pool mapping">
|
|
||||||
This request will cause the server to remap the backing memory
|
|
||||||
for the pool from the file descriptor passed when the pool was
|
|
||||||
- created, but using the new size.
|
|
||||||
+ created, but using the new size. This request can only be
|
|
||||||
+ used to make the pool bigger.
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<arg name="size" type="int"/>
|
|
||||||
@@ -549,8 +550,8 @@
|
|
||||||
The current and pending input regions of the icon wl_surface are
|
|
||||||
cleared, and wl_surface.set_input_region is ignored until the
|
|
||||||
wl_surface is no longer used as the icon surface. When the use
|
|
||||||
- as an icon ends, the the current and pending input regions
|
|
||||||
- become undefined, and the wl_surface is unmapped.
|
|
||||||
+ as an icon ends, the current and pending input regions become
|
|
||||||
+ undefined, and the wl_surface is unmapped.
|
|
||||||
</description>
|
|
||||||
<arg name="source" type="object" interface="wl_data_source" allow-null="true"/>
|
|
||||||
<arg name="origin" type="object" interface="wl_surface"/>
|
|
||||||
@@ -976,6 +977,14 @@
|
|
||||||
cursor images for pointers, drag icons, etc.
|
|
||||||
</description>
|
|
||||||
|
|
||||||
+ <enum name="error">
|
|
||||||
+ <description summary="wl_surface error values">
|
|
||||||
+ These errors can be emitted in response to wl_surface requests.
|
|
||||||
+ </description>
|
|
||||||
+ <entry name="invalid_scale" value="0" summary="buffer scale value is invalid"/>
|
|
||||||
+ <entry name="invalid_transform" value="1" summary="buffer transform value is invalid"/>
|
|
||||||
+ </enum>
|
|
||||||
+
|
|
||||||
<request name="destroy" type="destructor">
|
|
||||||
<description summary="delete surface">
|
|
||||||
Deletes the surface and invalidates its object ID.
|
|
||||||
@@ -1059,28 +1068,39 @@
|
|
||||||
</request>
|
|
||||||
|
|
||||||
<request name="frame">
|
|
||||||
- <description summary="request repaint feedback">
|
|
||||||
- Request notification when the next frame is displayed. Useful
|
|
||||||
- for throttling redrawing operations, and driving animations.
|
|
||||||
+ <description summary="request a frame throttling hint">
|
|
||||||
+ Request a notification when it is a good time start drawing a new
|
|
||||||
+ frame, by creating a frame callback. This is useful for throttling
|
|
||||||
+ redrawing operations, and driving animations.
|
|
||||||
+
|
|
||||||
+ When a client is animating on a wl_surface, it can use the 'frame'
|
|
||||||
+ request to get notified when it is a good time to draw and commit the
|
|
||||||
+ next frame of animation. If the client commits an update earlier than
|
|
||||||
+ that, it is likely that some updates will not make it to the display,
|
|
||||||
+ and the client is wasting resources by drawing too often.
|
|
||||||
+
|
|
||||||
The frame request will take effect on the next wl_surface.commit.
|
|
||||||
The notification will only be posted for one frame unless
|
|
||||||
- requested again.
|
|
||||||
+ requested again. For a wl_surface, the notifications are posted in
|
|
||||||
+ the order the frame requests were committed.
|
|
||||||
+
|
|
||||||
+ The server must send the notifications so that a client
|
|
||||||
+ will not send excessive updates, while still allowing
|
|
||||||
+ the highest possible update rate for clients that wait for the reply
|
|
||||||
+ before drawing again. The server should give some time for the client
|
|
||||||
+ to draw and commit after sending the frame callback events to let them
|
|
||||||
+ hit the next output refresh.
|
|
||||||
|
|
||||||
A server should avoid signalling the frame callbacks if the
|
|
||||||
surface is not visible in any way, e.g. the surface is off-screen,
|
|
||||||
or completely obscured by other opaque surfaces.
|
|
||||||
|
|
||||||
- A client can request a frame callback even without an attach,
|
|
||||||
- damage, or any other state changes. wl_surface.commit triggers a
|
|
||||||
- display update, so the callback event will arrive after the next
|
|
||||||
- output refresh where the surface is visible.
|
|
||||||
-
|
|
||||||
The object returned by this request will be destroyed by the
|
|
||||||
compositor after the callback is fired and as such the client must not
|
|
||||||
attempt to use it after that point.
|
|
||||||
|
|
||||||
The callback_data passed in the callback is the current time, in
|
|
||||||
- milliseconds.
|
|
||||||
+ milliseconds, with an undefined base.
|
|
||||||
</description>
|
|
||||||
|
|
||||||
<arg name="callback" type="new_id" interface="wl_callback"/>
|
|
||||||
@@ -1201,6 +1221,11 @@
|
|
||||||
|
|
||||||
A newly created surface has its buffer transformation set to normal.
|
|
||||||
|
|
||||||
+ wl_surface.set_buffer_transform changes the pending buffer
|
|
||||||
+ transformation. wl_surface.commit copies the pending buffer
|
|
||||||
+ transformation to the current one. Otherwise, the pending and current
|
|
||||||
+ values are never changed.
|
|
||||||
+
|
|
||||||
The purpose of this request is to allow clients to render content
|
|
||||||
according to the output transform, thus permiting the compositor to
|
|
||||||
use certain optimizations even if the display is rotated. Using
|
|
||||||
@@ -1212,6 +1237,10 @@
|
|
||||||
Note that if the transform value includes 90 or 270 degree rotation,
|
|
||||||
the width of the buffer will become the surface height and the height
|
|
||||||
of the buffer will become the surface width.
|
|
||||||
+
|
|
||||||
+ If transform is not one of the values from the
|
|
||||||
+ wl_output.transform enum the invalid_transform protocol error
|
|
||||||
+ is raised.
|
|
||||||
</description>
|
|
||||||
<arg name="transform" type="int"/>
|
|
||||||
</request>
|
|
||||||
@@ -1227,6 +1256,10 @@
|
|
||||||
|
|
||||||
A newly created surface has its buffer scale set to 1.
|
|
||||||
|
|
||||||
+ wl_surface.set_buffer_scale changes the pending buffer scale.
|
|
||||||
+ wl_surface.commit copies the pending buffer scale to the current one.
|
|
||||||
+ Otherwise, the pending and current values are never changed.
|
|
||||||
+
|
|
||||||
The purpose of this request is to allow clients to supply higher
|
|
||||||
resolution buffer data for use on high resolution outputs. Its
|
|
||||||
intended that you pick the same buffer scale as the scale of the
|
|
||||||
@@ -1236,12 +1269,15 @@
|
|
||||||
Note that if the scale is larger than 1, then you have to attach
|
|
||||||
a buffer that is larger (by a factor of scale in each dimension)
|
|
||||||
than the desired surface size.
|
|
||||||
+
|
|
||||||
+ If scale is not positive the invalid_scale protocol error is
|
|
||||||
+ raised.
|
|
||||||
</description>
|
|
||||||
<arg name="scale" type="int"/>
|
|
||||||
</request>
|
|
||||||
</interface>
|
|
||||||
|
|
||||||
- <interface name="wl_seat" version="3">
|
|
||||||
+ <interface name="wl_seat" version="4">
|
|
||||||
<description summary="group of input devices">
|
|
||||||
A seat is a group of keyboards, pointer and touch devices. This
|
|
||||||
object is published as a global during start up, or when such a
|
|
||||||
@@ -1363,10 +1399,6 @@
|
|
||||||
<arg name="hotspot_y" type="int" summary="y coordinate in surface-relative coordinates"/>
|
|
||||||
</request>
|
|
||||||
|
|
||||||
- <request name="release" type="destructor" since="3">
|
|
||||||
- <description summary="release the pointer object"/>
|
|
||||||
- </request>
|
|
||||||
-
|
|
||||||
<event name="enter">
|
|
||||||
<description summary="enter event">
|
|
||||||
Notification that this seat's pointer is focused on a certain
|
|
||||||
@@ -1464,18 +1496,21 @@
|
|
||||||
<arg name="axis" type="uint"/>
|
|
||||||
<arg name="value" type="fixed"/>
|
|
||||||
</event>
|
|
||||||
+
|
|
||||||
+ <!-- Version 3 additions -->
|
|
||||||
+
|
|
||||||
+ <request name="release" type="destructor" since="3">
|
|
||||||
+ <description summary="release the pointer object"/>
|
|
||||||
+ </request>
|
|
||||||
+
|
|
||||||
</interface>
|
|
||||||
|
|
||||||
- <interface name="wl_keyboard" version="3">
|
|
||||||
+ <interface name="wl_keyboard" version="4">
|
|
||||||
<description summary="keyboard input device">
|
|
||||||
The wl_keyboard interface represents one or more keyboards
|
|
||||||
associated with a seat.
|
|
||||||
</description>
|
|
||||||
|
|
||||||
- <request name="release" type="destructor" since="3">
|
|
||||||
- <description summary="release the keyboard object"/>
|
|
||||||
- </request>
|
|
||||||
-
|
|
||||||
<enum name="keymap_format">
|
|
||||||
<description summary="keyboard mapping format">
|
|
||||||
This specifies the format of the keymap provided to the
|
|
||||||
@@ -1483,7 +1518,8 @@
|
|
||||||
</description>
|
|
||||||
<entry name="no_keymap" value="0"
|
|
||||||
summary="no keymap; client must understand how to interpret the raw keycode"/>
|
|
||||||
- <entry name="xkb_v1" value="1" summary="libxkbcommon compatible"/>
|
|
||||||
+ <entry name="xkb_v1" value="1"
|
|
||||||
+ summary="libxkbcommon compatible; to determine the xkb keycode, clients must add 8 to the key event keycode"/>
|
|
||||||
</enum>
|
|
||||||
|
|
||||||
<event name="keymap">
|
|
||||||
@@ -1551,6 +1587,36 @@
|
|
||||||
<arg name="mods_locked" type="uint"/>
|
|
||||||
<arg name="group" type="uint"/>
|
|
||||||
</event>
|
|
||||||
+
|
|
||||||
+ <!-- Version 3 additions -->
|
|
||||||
+
|
|
||||||
+ <request name="release" type="destructor" since="3">
|
|
||||||
+ <description summary="release the keyboard object"/>
|
|
||||||
+ </request>
|
|
||||||
+
|
|
||||||
+ <!-- Version 4 additions -->
|
|
||||||
+
|
|
||||||
+ <event name="repeat_info" since="4">
|
|
||||||
+ <description summary="repeat rate and delay">
|
|
||||||
+ Informs the client about the keyboard's repeat rate and delay.
|
|
||||||
+
|
|
||||||
+ This event is sent as soon as the wl_keyboard object has been created,
|
|
||||||
+ and is guaranteed to be received by the client before any key press
|
|
||||||
+ event.
|
|
||||||
+
|
|
||||||
+ Negative values for either rate or delay are illegal. A rate of zero
|
|
||||||
+ will disable any repeating (regardless of the value of delay).
|
|
||||||
+
|
|
||||||
+ This event can be sent later on as well with a new value if necessary,
|
|
||||||
+ so clients should continue listening for the event past the creation
|
|
||||||
+ of wl_keyboard.
|
|
||||||
+ </description>
|
|
||||||
+
|
|
||||||
+ <arg name="rate" type="int"
|
|
||||||
+ summary="the rate of repeating keys in characters per second"/>
|
|
||||||
+ <arg name="delay" type="int"
|
|
||||||
+ summary="delay in milliseconds since key down until repeating starts"/>
|
|
||||||
+ </event>
|
|
||||||
</interface>
|
|
||||||
|
|
||||||
<interface name="wl_touch" version="3">
|
|
||||||
@@ -1565,10 +1631,6 @@
|
|
||||||
contact point can be identified by the ID of the sequence.
|
|
||||||
</description>
|
|
||||||
|
|
||||||
- <request name="release" type="destructor" since="3">
|
|
||||||
- <description summary="release the touch object"/>
|
|
||||||
- </request>
|
|
||||||
-
|
|
||||||
<event name="down">
|
|
||||||
<description summary="touch down event and beginning of a touch sequence">
|
|
||||||
A new touch point has appeared on the surface. This touch point is
|
|
||||||
@@ -1621,6 +1683,12 @@
|
|
||||||
this surface may re-use the touch point ID.
|
|
||||||
</description>
|
|
||||||
</event>
|
|
||||||
+
|
|
||||||
+ <!-- Version 3 additions -->
|
|
||||||
+
|
|
||||||
+ <request name="release" type="destructor" since="3">
|
|
||||||
+ <description summary="release the touch object"/>
|
|
||||||
+ </request>
|
|
||||||
</interface>
|
|
||||||
|
|
||||||
<interface name="wl_output" version="2">
|
|
||||||
diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp
|
|
||||||
index db43e52..0354a0a 100644
|
|
||||||
--- a/src/client/qwaylandinputdevice.cpp
|
|
||||||
+++ b/src/client/qwaylandinputdevice.cpp
|
|
||||||
@@ -170,10 +170,10 @@ QWaylandInputDevice::Touch::~Touch()
|
|
||||||
|
|
||||||
QWaylandInputDevice::QWaylandInputDevice(QWaylandDisplay *display, int version, uint32_t id)
|
|
||||||
: QObject()
|
|
||||||
- , QtWayland::wl_seat(display->wl_registry(), id, qMin(version, 3))
|
|
||||||
+ , QtWayland::wl_seat(display->wl_registry(), id, qMin(version, 4))
|
|
||||||
, mQDisplay(display)
|
|
||||||
, mDisplay(display->wl_display())
|
|
||||||
- , mVersion(qMin(version, 3))
|
|
||||||
+ , mVersion(qMin(version, 4))
|
|
||||||
, mCaps(0)
|
|
||||||
, mDataDevice(0)
|
|
||||||
, mKeyboard(0)
|
|
||||||
diff --git a/src/compositor/wayland_wrapper/qwlinputdevice.cpp b/src/compositor/wayland_wrapper/qwlinputdevice.cpp
|
|
||||||
index 9f743f2..e6ef636 100644
|
|
||||||
--- a/src/compositor/wayland_wrapper/qwlinputdevice.cpp
|
|
||||||
+++ b/src/compositor/wayland_wrapper/qwlinputdevice.cpp
|
|
||||||
@@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE
|
|
||||||
namespace QtWayland {
|
|
||||||
|
|
||||||
InputDevice::InputDevice(QWaylandInputDevice *handle, Compositor *compositor, QWaylandInputDevice::CapabilityFlags caps)
|
|
||||||
- : QtWaylandServer::wl_seat(compositor->wl_display(), 3)
|
|
||||||
+ : QtWaylandServer::wl_seat(compositor->wl_display(), 4)
|
|
||||||
, m_handle(handle)
|
|
||||||
, m_dragHandle(new QWaylandDrag(this))
|
|
||||||
, m_compositor(compositor)
|
|
||||||
--
|
|
||||||
1.9.3
|
|
||||||
|
|
||||||
@@ -1,15 +1,6 @@
|
|||||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
|
SRCREV = "862673b75f81e7e836ea083498734b49bae4218a"
|
||||||
|
QT_MODULE_BRANCH = "5.5.0"
|
||||||
SRCREV = "c1c8d30ce7bee081af5e917cac4d980b542cb905"
|
QT_VERSION = "5.5.0"
|
||||||
|
|
||||||
SRC_URI = " \
|
|
||||||
git://github.com/maui-packages/qtwayland.git;branch=output54 \
|
|
||||||
file://0001-examples-wayland-include-server-buffer-only-when-bui.patch \
|
|
||||||
"
|
|
||||||
|
|
||||||
S = "${WORKDIR}/git"
|
|
||||||
|
|
||||||
QT_VERSION = "5.4.2"
|
|
||||||
|
|
||||||
LICENSE = "GFDL-1.3 & BSD & (LGPL-2.1 & Digia-Qt-LGPL-Exception-1.1 | LGPL-3.0)"
|
LICENSE = "GFDL-1.3 & BSD & (LGPL-2.1 & Digia-Qt-LGPL-Exception-1.1 | LGPL-3.0)"
|
||||||
LIC_FILES_CHKSUM = "file://LICENSE.LGPLv21;md5=58a180e1cf84c756c29f782b3a485c29 \
|
LIC_FILES_CHKSUM = "file://LICENSE.LGPLv21;md5=58a180e1cf84c756c29f782b3a485c29 \
|
||||||
|
|||||||
Reference in New Issue
Block a user