summaryrefslogtreecommitdiffstats
path: root/src/compositor
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-09-25 03:00:56 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2018-09-25 03:00:56 +0200
commit0fbc2f68c87e0057ed7df3ad500c7dfe5c61d9d8 (patch)
treec8cc693badfce0fdabfec8feb328d8251615820c /src/compositor
parentaede513e7c592dd189754898a38d1aac432d55ed (diff)
parent582af70640e411d8f423f1bc0528d5a5fce08e3a (diff)
Merge remote-tracking branch 'origin/5.12' into dev
Diffstat (limited to 'src/compositor')
-rw-r--r--src/compositor/compositor_api/qwaylandcompositor.cpp4
-rw-r--r--src/compositor/compositor_api/qwaylandcompositor.h4
-rw-r--r--src/compositor/compositor_api/qwaylandkeyboard.cpp2
-rw-r--r--src/compositor/configure.json11
-rw-r--r--src/compositor/extensions/pregenerated/3rdparty/qwayland-server-xdg-shell-unstable-v5_p.h6
-rw-r--r--src/compositor/extensions/qwaylandtextinput.cpp8
-rw-r--r--src/compositor/hardware_integration/qwlserverbufferintegration_p.h1
-rw-r--r--src/compositor/wayland_wrapper/qwlbuffermanager.cpp2
-rw-r--r--src/compositor/wayland_wrapper/qwldatadevicemanager.cpp4
-rw-r--r--src/compositor/wayland_wrapper/qwlregion_p.h2
10 files changed, 30 insertions, 14 deletions
diff --git a/src/compositor/compositor_api/qwaylandcompositor.cpp b/src/compositor/compositor_api/qwaylandcompositor.cpp
index 8d902bcea..c782304ed 100644
--- a/src/compositor/compositor_api/qwaylandcompositor.cpp
+++ b/src/compositor/compositor_api/qwaylandcompositor.cpp
@@ -96,7 +96,9 @@
QT_BEGIN_NAMESPACE
-Q_LOGGING_CATEGORY(qLcCompositorInputMethods, "qt.compositor.input.methods")
+Q_LOGGING_CATEGORY(qLcWaylandCompositor, "qt.waylandcompositor")
+Q_LOGGING_CATEGORY(qLcWaylandCompositorHardwareIntegration, "qt.waylandcompositor.hardwareintegration")
+Q_LOGGING_CATEGORY(qLcWaylandCompositorInputMethods, "qt.waylandcompositor.inputmethods")
namespace QtWayland {
diff --git a/src/compositor/compositor_api/qwaylandcompositor.h b/src/compositor/compositor_api/qwaylandcompositor.h
index 78684bc3e..6bc3c1886 100644
--- a/src/compositor/compositor_api/qwaylandcompositor.h
+++ b/src/compositor/compositor_api/qwaylandcompositor.h
@@ -70,7 +70,9 @@ class QWaylandTouch;
class QWaylandSurfaceGrabber;
class QWaylandBufferRef;
-Q_DECLARE_LOGGING_CATEGORY(qLcCompositorInputMethods)
+Q_WAYLAND_COMPOSITOR_EXPORT Q_DECLARE_LOGGING_CATEGORY(qLcWaylandCompositor)
+Q_WAYLAND_COMPOSITOR_EXPORT Q_DECLARE_LOGGING_CATEGORY(qLcWaylandCompositorHardwareIntegration)
+Q_DECLARE_LOGGING_CATEGORY(qLcWaylandCompositorInputMethods)
class Q_WAYLAND_COMPOSITOR_EXPORT QWaylandCompositor : public QWaylandObject
{
diff --git a/src/compositor/compositor_api/qwaylandkeyboard.cpp b/src/compositor/compositor_api/qwaylandkeyboard.cpp
index aa3b49b7a..e067eeafe 100644
--- a/src/compositor/compositor_api/qwaylandkeyboard.cpp
+++ b/src/compositor/compositor_api/qwaylandkeyboard.cpp
@@ -92,7 +92,7 @@ void QWaylandKeyboardPrivate::checkFocusResource(Resource *keyboardResource)
return;
// check if new wl_keyboard resource is from the client owning the focus surface
- if (focus->resource()->client == keyboardResource->client()) {
+ if (wl_resource_get_client(focus->resource()) == keyboardResource->client()) {
sendEnter(focus, keyboardResource);
focusResource = keyboardResource;
}
diff --git a/src/compositor/configure.json b/src/compositor/configure.json
index 6864a94f9..3b3d33200 100644
--- a/src/compositor/configure.json
+++ b/src/compositor/configure.json
@@ -73,6 +73,12 @@
"type": "compile",
"test": "libhybris_egl_server",
"use": "egl"
+ },
+ "dmabuf-server-buffer": {
+ "label": "Linux dma-buf Buffer Sharing",
+ "type": "compile",
+ "test": "dmabuf_server_buffer",
+ "use": "egl"
}
},
@@ -116,6 +122,11 @@
"condition": "features.wayland-server && features.opengl && features.egl && tests.libhybris-egl-server",
"output": [ "privateFeature" ]
},
+ "wayland-dmabuf-server-buffer": {
+ "label": "Linux dma-buf server buffer integration",
+ "condition": "features.wayland-server && features.opengl && features.egl && tests.dmabuf-server-buffer",
+ "output": [ "privateFeature" ]
+ },
"wayland-shm-emulation-server-buffer": {
"label": "Shm emulation server buffer",
"condition": "features.wayland-server && features.opengl",
diff --git a/src/compositor/extensions/pregenerated/3rdparty/qwayland-server-xdg-shell-unstable-v5_p.h b/src/compositor/extensions/pregenerated/3rdparty/qwayland-server-xdg-shell-unstable-v5_p.h
index dfd42535e..63817a5e3 100644
--- a/src/compositor/extensions/pregenerated/3rdparty/qwayland-server-xdg-shell-unstable-v5_p.h
+++ b/src/compositor/extensions/pregenerated/3rdparty/qwayland-server-xdg-shell-unstable-v5_p.h
@@ -73,7 +73,7 @@ namespace QtWaylandServer {
xdg_shell_v5 *xdg_shell_object;
struct ::wl_resource *handle;
- struct ::wl_client *client() const { return handle->client; }
+ struct ::wl_client *client() const { return wl_resource_get_client(handle); }
int version() const { return wl_resource_get_version(handle); }
static Resource *fromResource(struct ::wl_resource *resource);
@@ -193,7 +193,7 @@ namespace QtWaylandServer {
xdg_surface_v5 *xdg_surface_object;
struct ::wl_resource *handle;
- struct ::wl_client *client() const { return handle->client; }
+ struct ::wl_client *client() const { return wl_resource_get_client(handle); }
int version() const { return wl_resource_get_version(handle); }
static Resource *fromResource(struct ::wl_resource *resource);
@@ -366,7 +366,7 @@ namespace QtWaylandServer {
xdg_popup_v5 *xdg_popup_object;
struct ::wl_resource *handle;
- struct ::wl_client *client() const { return handle->client; }
+ struct ::wl_client *client() const { return wl_resource_get_client(handle); }
int version() const { return wl_resource_get_version(handle); }
static Resource *fromResource(struct ::wl_resource *resource);
diff --git a/src/compositor/extensions/qwaylandtextinput.cpp b/src/compositor/extensions/qwaylandtextinput.cpp
index b832bb737..6cf33d18d 100644
--- a/src/compositor/extensions/qwaylandtextinput.cpp
+++ b/src/compositor/extensions/qwaylandtextinput.cpp
@@ -190,7 +190,7 @@ void QWaylandTextInputPrivate::sendInputMethodEvent(QInputMethodEvent *event)
currentState->anchorPosition = afterCommit.anchorPosition;
if (queries) {
- qCDebug(qLcCompositorInputMethods) << "QInputMethod::update() after QInputMethodEvent" << queries;
+ qCDebug(qLcWaylandCompositorInputMethods) << "QInputMethod::update() after QInputMethodEvent" << queries;
emit q->updateInputMethod(queries);
}
@@ -377,13 +377,13 @@ void QWaylandTextInputPrivate::zwp_text_input_v2_update_state(Resource *resource
{
Q_Q(QWaylandTextInput);
- qCDebug(qLcCompositorInputMethods) << "update_state" << serial << flags;
+ qCDebug(qLcWaylandCompositorInputMethods) << "update_state" << serial << flags;
if (resource != focusResource)
return;
if (flags == update_state_reset || flags == update_state_enter) {
- qCDebug(qLcCompositorInputMethods) << "QInputMethod::reset()";
+ qCDebug(qLcWaylandCompositorInputMethods) << "QInputMethod::reset()";
qApp->inputMethod()->reset();
}
@@ -400,7 +400,7 @@ void QWaylandTextInputPrivate::zwp_text_input_v2_update_state(Resource *resource
pendingState.reset(new QWaylandTextInputClientState);
if (queries) {
- qCDebug(qLcCompositorInputMethods) << "QInputMethod::update()" << queries;
+ qCDebug(qLcWaylandCompositorInputMethods) << "QInputMethod::update()" << queries;
emit q->updateInputMethod(queries);
}
diff --git a/src/compositor/hardware_integration/qwlserverbufferintegration_p.h b/src/compositor/hardware_integration/qwlserverbufferintegration_p.h
index c27fd4e44..7d8901d58 100644
--- a/src/compositor/hardware_integration/qwlserverbufferintegration_p.h
+++ b/src/compositor/hardware_integration/qwlserverbufferintegration_p.h
@@ -82,6 +82,7 @@ public:
virtual ~ServerBuffer();
virtual struct ::wl_resource *resourceForClient(struct ::wl_client *) = 0;
+ virtual bool bufferInUse() { return true; }
virtual QOpenGLTexture *toOpenGlTexture() = 0;
diff --git a/src/compositor/wayland_wrapper/qwlbuffermanager.cpp b/src/compositor/wayland_wrapper/qwlbuffermanager.cpp
index d5c661e93..b4f3d6822 100644
--- a/src/compositor/wayland_wrapper/qwlbuffermanager.cpp
+++ b/src/compositor/wayland_wrapper/qwlbuffermanager.cpp
@@ -84,7 +84,7 @@ ClientBuffer *BufferManager::getBuffer(wl_resource *buffer_resource)
auto *destroy_listener = new buffer_manager_destroy_listener;
destroy_listener->d = this;
- wl_signal_add(&buffer_resource->destroy_signal, destroy_listener);
+ wl_resource_add_destroy_listener(buffer_resource, destroy_listener);
return newBuffer;
}
diff --git a/src/compositor/wayland_wrapper/qwldatadevicemanager.cpp b/src/compositor/wayland_wrapper/qwldatadevicemanager.cpp
index de62ffc3b..e30bc84f8 100644
--- a/src/compositor/wayland_wrapper/qwldatadevicemanager.cpp
+++ b/src/compositor/wayland_wrapper/qwldatadevicemanager.cpp
@@ -210,7 +210,7 @@ bool DataDeviceManager::offerFromCompositorToClient(wl_resource *clientDataDevic
if (!m_compositorOwnsSelection)
return false;
- wl_client *client = clientDataDeviceResource->client;
+ wl_client *client = wl_resource_get_client(clientDataDeviceResource);
//qDebug("compositor offers %d types to %p", m_retainedData.formats().count(), client);
struct wl_resource *selectionOffer =
@@ -253,7 +253,7 @@ void DataDeviceManager::comp_accept(wl_client *, wl_resource *, uint32_t, const
void DataDeviceManager::comp_receive(wl_client *client, wl_resource *resource, const char *mime_type, int32_t fd)
{
Q_UNUSED(client);
- DataDeviceManager *self = static_cast<DataDeviceManager *>(resource->data);
+ DataDeviceManager *self = static_cast<DataDeviceManager *>(wl_resource_get_user_data(resource));
//qDebug("client %p wants data for type %s from compositor", client, mime_type);
QByteArray content = QWaylandMimeHelper::getByteArray(&self->m_retainedData, QString::fromLatin1(mime_type));
if (!content.isEmpty()) {
diff --git a/src/compositor/wayland_wrapper/qwlregion_p.h b/src/compositor/wayland_wrapper/qwlregion_p.h
index 00e1d239f..0a05a6733 100644
--- a/src/compositor/wayland_wrapper/qwlregion_p.h
+++ b/src/compositor/wayland_wrapper/qwlregion_p.h
@@ -70,7 +70,7 @@ public:
static Region *fromResource(struct ::wl_resource *resource);
- uint id() const { return resource()->handle->object.id; }
+ uint id() const { return wl_resource_get_id(resource()->handle); }
QRegion region() const { return m_region; }