summaryrefslogtreecommitdiffstats
path: root/src/hardwareintegration/compositor/xcomposite_share
diff options
context:
space:
mode:
Diffstat (limited to 'src/hardwareintegration/compositor/xcomposite_share')
-rw-r--r--src/hardwareintegration/compositor/xcomposite_share/xcomposite_share.pri16
-rw-r--r--src/hardwareintegration/compositor/xcomposite_share/xcompositebuffer.cpp61
-rw-r--r--src/hardwareintegration/compositor/xcomposite_share/xcompositebuffer.h81
-rw-r--r--src/hardwareintegration/compositor/xcomposite_share/xcompositehandler.cpp66
-rw-r--r--src/hardwareintegration/compositor/xcomposite_share/xcompositehandler.h61
-rw-r--r--src/hardwareintegration/compositor/xcomposite_share/xlibinclude.h67
6 files changed, 0 insertions, 352 deletions
diff --git a/src/hardwareintegration/compositor/xcomposite_share/xcomposite_share.pri b/src/hardwareintegration/compositor/xcomposite_share/xcomposite_share.pri
deleted file mode 100644
index 69ab6aa10..000000000
--- a/src/hardwareintegration/compositor/xcomposite_share/xcomposite_share.pri
+++ /dev/null
@@ -1,16 +0,0 @@
-INCLUDEPATH += $$PWD
-
-QMAKE_USE += xcomposite
-CONFIG += wayland-scanner
-WAYLANDSERVERSOURCES += $$PWD/../../../extensions/xcomposite.xml $$PWD/../../../3rdparty/protocol/wayland.xml
-
-HEADERS += \
- $$PWD/xcompositebuffer.h \
- $$PWD/xcompositehandler.h \
- $$PWD/xlibinclude.h
-
-SOURCES += \
- $$PWD/xcompositebuffer.cpp \
- $$PWD/xcompositehandler.cpp
-
-QT += gui-private
diff --git a/src/hardwareintegration/compositor/xcomposite_share/xcompositebuffer.cpp b/src/hardwareintegration/compositor/xcomposite_share/xcompositebuffer.cpp
deleted file mode 100644
index b79a713a1..000000000
--- a/src/hardwareintegration/compositor/xcomposite_share/xcompositebuffer.cpp
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtWaylandCompositor module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** 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 The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "xcompositehandler.h"
-#include "xcompositebuffer.h"
-
-QT_BEGIN_NAMESPACE
-
-XCompositeBuffer::XCompositeBuffer(Window window, const QSize &size,
- struct ::wl_client *client, uint32_t id, XCompositeHandler *handler)
- : QtWaylandServer::wl_buffer(client, id, 1)
- , mWindow(window)
- , mOrigin(QWaylandSurface::OriginBottomLeft)
- , mSize(size)
- , mHandler(handler)
-{
-}
-
-void XCompositeBuffer::buffer_destroy_resource(Resource *resource)
-{
- mHandler->removeBuffer(resource->handle);
- delete this;
-}
-
-void XCompositeBuffer::buffer_destroy(Resource *resource)
-{
- wl_resource_destroy(resource->handle);
-}
-
-Window XCompositeBuffer::window()
-{
- return mWindow;
-}
-
-QT_END_NAMESPACE
diff --git a/src/hardwareintegration/compositor/xcomposite_share/xcompositebuffer.h b/src/hardwareintegration/compositor/xcomposite_share/xcompositebuffer.h
deleted file mode 100644
index 0e6e63457..000000000
--- a/src/hardwareintegration/compositor/xcomposite_share/xcompositebuffer.h
+++ /dev/null
@@ -1,81 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtWaylandCompositor module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** 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 The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef XCOMPOSITEBUFFER_H
-#define XCOMPOSITEBUFFER_H
-
-#include <qwayland-server-wayland.h>
-
-#include <QtWaylandCompositor/private/qwaylandutils_p.h>
-
-#include <QtWaylandCompositor/QWaylandSurface>
-#include <QtWaylandCompositor/QWaylandCompositor>
-
-#include <QtCore/QSize>
-
-#include <QtCore/QTextStream>
-#include <QtCore/QDataStream>
-#include <QtCore/QMetaType>
-#include <QtCore/QVariant>
-
-#include <X11/X.h>
-
-QT_BEGIN_NAMESPACE
-
-class XCompositeHandler;
-
-class XCompositeBuffer : public QtWaylandServer::wl_buffer
-{
-public:
- XCompositeBuffer(Window window, const QSize &size,
- struct ::wl_client *client, uint32_t id, XCompositeHandler *handler);
-
- Window window();
-
- QWaylandSurface::Origin origin() const { return mOrigin; }
- void setOrigin(QWaylandSurface::Origin origin) { mOrigin = origin; }
-
- QSize size() const { return mSize; }
-
- static XCompositeBuffer *fromResource(struct ::wl_resource *resource) { return QtWayland::fromResource<XCompositeBuffer *>(resource); }
-
-protected:
- void buffer_destroy_resource(Resource *) override;
- void buffer_destroy(Resource *) override;
-
-private:
- Window mWindow;
- QWaylandSurface::Origin mOrigin;
- QSize mSize;
- XCompositeHandler *mHandler = nullptr;
-};
-
-QT_END_NAMESPACE
-
-#endif // XCOMPOSITORBUFFER_H
diff --git a/src/hardwareintegration/compositor/xcomposite_share/xcompositehandler.cpp b/src/hardwareintegration/compositor/xcomposite_share/xcompositehandler.cpp
deleted file mode 100644
index c4e2d2264..000000000
--- a/src/hardwareintegration/compositor/xcomposite_share/xcompositehandler.cpp
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtWaylandCompositor module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** 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 The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "xcompositehandler.h"
-
-#include "wayland-xcomposite-server-protocol.h"
-
-#include "xcompositebuffer.h"
-#include <X11/extensions/Xcomposite.h>
-
-QT_BEGIN_NAMESPACE
-
-XCompositeHandler::XCompositeHandler(QWaylandCompositor *compositor, Display *display)
- : QtWaylandServer::qt_xcomposite(compositor->display(), 1)
-{
- mFakeRootWindow = new QWindow();
- mFakeRootWindow->setGeometry(QRect(-1,-1,1,1));
- mFakeRootWindow->create();
- mFakeRootWindow->show();
-
- int composite_event_base, composite_error_base;
- if (!XCompositeQueryExtension(display, &composite_event_base, &composite_error_base))
- qFatal("XComposite required");
-
- mDisplayString = QString::fromLocal8Bit(XDisplayString(display));
-}
-
-void XCompositeHandler::xcomposite_bind_resource(Resource *resource)
-{
- send_root(resource->handle, mDisplayString, mFakeRootWindow->winId());
-}
-
-void XCompositeHandler::xcomposite_create_buffer(Resource *resource, uint32_t id, uint32_t window,
- int32_t width, int32_t height)
-{
- auto *buf = new XCompositeBuffer(Window(window), QSize(width, height), resource->client(), id, this);
- mKnownBuffers.insert(buf->resource()->handle);
-}
-
-QT_END_NAMESPACE
diff --git a/src/hardwareintegration/compositor/xcomposite_share/xcompositehandler.h b/src/hardwareintegration/compositor/xcomposite_share/xcompositehandler.h
deleted file mode 100644
index 4f7dc406c..000000000
--- a/src/hardwareintegration/compositor/xcomposite_share/xcompositehandler.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtWaylandCompositor module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** 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 The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef XCOMPOSITEHANDLER_H
-#define XCOMPOSITEHANDLER_H
-
-#include <QtWaylandCompositor/QWaylandCompositor>
-
-#include "xlibinclude.h"
-
-#include "qwayland-server-xcomposite.h"
-#include <wayland-server-core.h>
-
-QT_BEGIN_NAMESPACE
-
-class XCompositeHandler : public QtWaylandServer::qt_xcomposite
-{
-public:
- XCompositeHandler(QWaylandCompositor *compositor, Display *display);
- bool isXCompositeBuffer(wl_resource *resource) { return mKnownBuffers.contains(resource); }
- void removeBuffer(wl_resource *resource) { mKnownBuffers.remove(resource); }
-
-private:
- QWindow *mFakeRootWindow = nullptr;
- QString mDisplayString;
- QSet<wl_resource *> mKnownBuffers;
-
- void xcomposite_bind_resource(Resource *resource) override;
- void xcomposite_create_buffer(Resource *resource, uint32_t id, uint32_t x_window,
- int32_t width, int32_t height) override;
-};
-
-QT_END_NAMESPACE
-
-#endif // XCOMPOSITEHANDLER_H
diff --git a/src/hardwareintegration/compositor/xcomposite_share/xlibinclude.h b/src/hardwareintegration/compositor/xcomposite_share/xlibinclude.h
deleted file mode 100644
index ca3542aaa..000000000
--- a/src/hardwareintegration/compositor/xcomposite_share/xlibinclude.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the QtWaylandCompositor module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** 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 The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef XLIBINCLUDE_H
-#define XLIBINCLUDE_H
-
-#include <QtCore/QEvent>
-#include <QtCore/QTextStream>
-#include <QtCore/QDataStream>
-#include <QtCore/QMetaType>
-#include <QtCore/QVariant>
-#include <QtGui/QCursor>
-#include <QtGui/private/qguiapplication_p.h>
-
-#include <X11/Xlib.h>
-#include "X11/extensions/Xcomposite.h"
-
-enum {
- XFocusOut = FocusOut,
- XFocusIn = FocusIn,
- XKeyPress = KeyPress,
- XKeyRelease = KeyRelease,
- XNone = None,
- XRevertToParent = RevertToParent,
- XGrayScale = GrayScale,
- XCursorShape = CursorShape
-};
-#undef FocusOut
-#undef FocusIn
-#undef KeyPress
-#undef KeyRelease
-#undef None
-#undef RevertToParent
-#undef GrayScale
-#undef CursorShape
-
-#ifdef FontChange
-#undef FontChange
-#endif
-
-#endif //XLIBINCLUDE_H