Merge remote-tracking branch 'origin/5.6' into dev
Conflicts: src/client/qwaylandintegration.cpp Change-Id: I29120f06d33c2d383a41cf35ca4a59f5d8548ad7
This commit is contained in:
commit
7dbe121971
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDCLIENTBUFFERINTEGRATION_H
|
#ifndef QWAYLANDCLIENTBUFFERINTEGRATION_H
|
||||||
#define QWAYLANDCLIENTBUFFERINTEGRATION_H
|
#define QWAYLANDCLIENTBUFFERINTEGRATION_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QtCore/qglobal.h>
|
#include <QtCore/qglobal.h>
|
||||||
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
||||||
|
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDCLIENTBUFFERINTEGRATIONFACTORY_H
|
#ifndef QWAYLANDCLIENTBUFFERINTEGRATIONFACTORY_H
|
||||||
#define QWAYLANDCLIENTBUFFERINTEGRATIONFACTORY_H
|
#define QWAYLANDCLIENTBUFFERINTEGRATIONFACTORY_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
||||||
#include <QtCore/QStringList>
|
#include <QtCore/QStringList>
|
||||||
|
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDCLIENTBUFFERINTEGRATIONPLUGIN_H
|
#ifndef QWAYLANDCLIENTBUFFERINTEGRATIONPLUGIN_H
|
||||||
#define QWAYLANDCLIENTBUFFERINTEGRATIONPLUGIN_H
|
#define QWAYLANDCLIENTBUFFERINTEGRATIONPLUGIN_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
||||||
|
|
||||||
#include <QtCore/qplugin.h>
|
#include <QtCore/qplugin.h>
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDHARDWAREINTEGRATION_H
|
#ifndef QWAYLANDHARDWAREINTEGRATION_H
|
||||||
#define QWAYLANDHARDWAREINTEGRATION_H
|
#define QWAYLANDHARDWAREINTEGRATION_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QtWaylandClient/private/qwayland-hardware-integration.h>
|
#include <QtWaylandClient/private/qwayland-hardware-integration.h>
|
||||||
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
||||||
|
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDSERVERBUFFERINTEGRATION_H
|
#ifndef QWAYLANDSERVERBUFFERINTEGRATION_H
|
||||||
#define QWAYLANDSERVERBUFFERINTEGRATION_H
|
#define QWAYLANDSERVERBUFFERINTEGRATION_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QtCore/QSize>
|
#include <QtCore/QSize>
|
||||||
#include <QtGui/qopengl.h>
|
#include <QtGui/qopengl.h>
|
||||||
|
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDSERVERBUFFERINTEGRATIONFACTORY_H
|
#ifndef QWAYLANDSERVERBUFFERINTEGRATIONFACTORY_H
|
||||||
#define QWAYLANDSERVERBUFFERINTEGRATIONFACTORY_H
|
#define QWAYLANDSERVERBUFFERINTEGRATIONFACTORY_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
||||||
#include <QtCore/QStringList>
|
#include <QtCore/QStringList>
|
||||||
|
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDSERVERBUFFERINTEGRATIONPLUGIN_H
|
#ifndef QWAYLANDSERVERBUFFERINTEGRATIONPLUGIN_H
|
||||||
#define QWAYLANDSERVERBUFFERINTEGRATIONPLUGIN_H
|
#define QWAYLANDSERVERBUFFERINTEGRATIONPLUGIN_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
||||||
|
|
||||||
#include <QtCore/qplugin.h>
|
#include <QtCore/qplugin.h>
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDINPUTDEVICEINTEGRATION_H
|
#ifndef QWAYLANDINPUTDEVICEINTEGRATION_H
|
||||||
#define QWAYLANDINPUTDEVICEINTEGRATION_H
|
#define QWAYLANDINPUTDEVICEINTEGRATION_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QtCore/qglobal.h>
|
#include <QtCore/qglobal.h>
|
||||||
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
||||||
|
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDINPUTDEVICEINTEGRATIONFACTORY_H
|
#ifndef QWAYLANDINPUTDEVICEINTEGRATIONFACTORY_H
|
||||||
#define QWAYLANDINPUTDEVICEINTEGRATIONFACTORY_H
|
#define QWAYLANDINPUTDEVICEINTEGRATIONFACTORY_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
||||||
#include <QtCore/QStringList>
|
#include <QtCore/QStringList>
|
||||||
|
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDINPUTDEVICEINTEGRATIONPLUGIN_H
|
#ifndef QWAYLANDINPUTDEVICEINTEGRATIONPLUGIN_H
|
||||||
#define QWAYLANDINPUTDEVICEINTEGRATIONPLUGIN_H
|
#define QWAYLANDINPUTDEVICEINTEGRATIONPLUGIN_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
||||||
|
|
||||||
#include <QtCore/qplugin.h>
|
#include <QtCore/qplugin.h>
|
||||||
|
@ -35,6 +35,17 @@
|
|||||||
#ifndef QWAYLANDABSTRACTDECORATION_H
|
#ifndef QWAYLANDABSTRACTDECORATION_H
|
||||||
#define QWAYLANDABSTRACTDECORATION_H
|
#define QWAYLANDABSTRACTDECORATION_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QtCore/QMargins>
|
#include <QtCore/QMargins>
|
||||||
#include <QtCore/QPointF>
|
#include <QtCore/QPointF>
|
||||||
#include <QtGui/QGuiApplication>
|
#include <QtGui/QGuiApplication>
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDBUFFER_H
|
#ifndef QWAYLANDBUFFER_H
|
||||||
#define QWAYLANDBUFFER_H
|
#define QWAYLANDBUFFER_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
||||||
|
|
||||||
#include <QtCore/QSize>
|
#include <QtCore/QSize>
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDCLIENTEXPORT_H
|
#ifndef QWAYLANDCLIENTEXPORT_H
|
||||||
#define QWAYLANDCLIENTEXPORT_H
|
#define QWAYLANDCLIENTEXPORT_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QtCore/qglobal.h>
|
#include <QtCore/qglobal.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDCLIPBOARD_H
|
#ifndef QWAYLANDCLIPBOARD_H
|
||||||
#define QWAYLANDCLIPBOARD_H
|
#define QWAYLANDCLIPBOARD_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <qpa/qplatformclipboard.h>
|
#include <qpa/qplatformclipboard.h>
|
||||||
#include <QtCore/QVariant>
|
#include <QtCore/QVariant>
|
||||||
|
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDCURSOR_H
|
#ifndef QWAYLANDCURSOR_H
|
||||||
#define QWAYLANDCURSOR_H
|
#define QWAYLANDCURSOR_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <qpa/qplatformcursor.h>
|
#include <qpa/qplatformcursor.h>
|
||||||
#include <QtCore/QMap>
|
#include <QtCore/QMap>
|
||||||
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
||||||
|
@ -41,6 +41,17 @@
|
|||||||
#ifndef QWAYLANDDATADEVICE_H
|
#ifndef QWAYLANDDATADEVICE_H
|
||||||
#define QWAYLANDDATADEVICE_H
|
#define QWAYLANDDATADEVICE_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QPoint>
|
#include <QPoint>
|
||||||
|
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDDATADEVICEMANAGER_H
|
#ifndef QWAYLANDDATADEVICEMANAGER_H
|
||||||
#define QWAYLANDDATADEVICEMANAGER_H
|
#define QWAYLANDDATADEVICEMANAGER_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
||||||
#include <QtWaylandClient/private/qwayland-wayland.h>
|
#include <QtWaylandClient/private/qwayland-wayland.h>
|
||||||
|
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDDATAOFFER_H
|
#ifndef QWAYLANDDATAOFFER_H
|
||||||
#define QWAYLANDDATAOFFER_H
|
#define QWAYLANDDATAOFFER_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QtGui/private/qdnd_p.h>
|
#include <QtGui/private/qdnd_p.h>
|
||||||
|
|
||||||
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDDATASOURCE_H
|
#ifndef QWAYLANDDATASOURCE_H
|
||||||
#define QWAYLANDDATASOURCE_H
|
#define QWAYLANDDATASOURCE_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
#include <QtWaylandClient/private/qwayland-wayland.h>
|
#include <QtWaylandClient/private/qwayland-wayland.h>
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDDECORATIONFACTORY_H
|
#ifndef QWAYLANDDECORATIONFACTORY_H
|
||||||
#define QWAYLANDDECORATIONFACTORY_H
|
#define QWAYLANDDECORATIONFACTORY_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
||||||
#include <QtCore/QStringList>
|
#include <QtCore/QStringList>
|
||||||
|
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDDECORATIONPLUGIN_H
|
#ifndef QWAYLANDDECORATIONPLUGIN_H
|
||||||
#define QWAYLANDDECORATIONPLUGIN_H
|
#define QWAYLANDDECORATIONPLUGIN_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
||||||
|
|
||||||
#include <QtCore/qplugin.h>
|
#include <QtCore/qplugin.h>
|
||||||
|
@ -154,12 +154,7 @@ QWaylandDisplay::QWaylandDisplay(QWaylandIntegration *waylandIntegration)
|
|||||||
mEventThreadObject->displayConnect();
|
mEventThreadObject->displayConnect();
|
||||||
mDisplay = mEventThreadObject->display(); //blocks until display is available
|
mDisplay = mEventThreadObject->display(); //blocks until display is available
|
||||||
|
|
||||||
//Create a new even queue for the QtGui thread
|
|
||||||
mEventQueue = wl_display_create_queue(mDisplay);
|
|
||||||
|
|
||||||
struct ::wl_registry *registry = wl_display_get_registry(mDisplay);
|
struct ::wl_registry *registry = wl_display_get_registry(mDisplay);
|
||||||
wl_proxy_set_queue((struct wl_proxy *)registry, mEventQueue);
|
|
||||||
|
|
||||||
init(registry);
|
init(registry);
|
||||||
|
|
||||||
connect(mEventThreadObject, SIGNAL(newEventsRead()), this, SLOT(flushRequests()));
|
connect(mEventThreadObject, SIGNAL(newEventsRead()), this, SLOT(flushRequests()));
|
||||||
@ -187,7 +182,7 @@ QWaylandDisplay::~QWaylandDisplay(void)
|
|||||||
|
|
||||||
void QWaylandDisplay::flushRequests()
|
void QWaylandDisplay::flushRequests()
|
||||||
{
|
{
|
||||||
if (wl_display_dispatch_queue_pending(mDisplay, mEventQueue) < 0) {
|
if (wl_display_dispatch_pending(mDisplay) < 0) {
|
||||||
mEventThreadObject->checkError();
|
mEventThreadObject->checkError();
|
||||||
exitWithError();
|
exitWithError();
|
||||||
}
|
}
|
||||||
@ -198,7 +193,7 @@ void QWaylandDisplay::flushRequests()
|
|||||||
|
|
||||||
void QWaylandDisplay::blockingReadEvents()
|
void QWaylandDisplay::blockingReadEvents()
|
||||||
{
|
{
|
||||||
if (wl_display_dispatch_queue(mDisplay, mEventQueue) < 0) {
|
if (wl_display_dispatch(mDisplay) < 0) {
|
||||||
mEventThreadObject->checkError();
|
mEventThreadObject->checkError();
|
||||||
exitWithError();
|
exitWithError();
|
||||||
}
|
}
|
||||||
@ -206,6 +201,8 @@ void QWaylandDisplay::blockingReadEvents()
|
|||||||
|
|
||||||
void QWaylandDisplay::exitWithError()
|
void QWaylandDisplay::exitWithError()
|
||||||
{
|
{
|
||||||
|
mEventThread->quit();
|
||||||
|
mEventThread->wait();
|
||||||
::exit(1);
|
::exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -348,17 +345,16 @@ void QWaylandDisplay::forceRoundTrip()
|
|||||||
int ret = 0;
|
int ret = 0;
|
||||||
bool done = false;
|
bool done = false;
|
||||||
wl_callback *callback = wl_display_sync(mDisplay);
|
wl_callback *callback = wl_display_sync(mDisplay);
|
||||||
wl_proxy_set_queue((struct wl_proxy *)callback, mEventQueue);
|
|
||||||
wl_callback_add_listener(callback, &sync_listener, &done);
|
wl_callback_add_listener(callback, &sync_listener, &done);
|
||||||
flushRequests();
|
flushRequests();
|
||||||
if (QThread::currentThread()->eventDispatcher()) {
|
if (QThread::currentThread()->eventDispatcher()) {
|
||||||
while (!done && ret >= 0) {
|
while (!done && ret >= 0) {
|
||||||
QThread::currentThread()->eventDispatcher()->processEvents(QEventLoop::WaitForMoreEvents);
|
QThread::currentThread()->eventDispatcher()->processEvents(QEventLoop::WaitForMoreEvents);
|
||||||
ret = wl_display_dispatch_queue_pending(mDisplay, mEventQueue);
|
ret = wl_display_dispatch_pending(mDisplay);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
while (!done && ret >= 0)
|
while (!done && ret >= 0)
|
||||||
ret = wl_display_dispatch_queue(mDisplay, mEventQueue);
|
ret = wl_display_dispatch(mDisplay);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret == -1 && !done)
|
if (ret == -1 && !done)
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDDISPLAY_H
|
#ifndef QWAYLANDDISPLAY_H
|
||||||
#define QWAYLANDDISPLAY_H
|
#define QWAYLANDDISPLAY_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QtCore/QObject>
|
#include <QtCore/QObject>
|
||||||
#include <QtCore/QRect>
|
#include <QtCore/QRect>
|
||||||
#include <QtCore/QPointer>
|
#include <QtCore/QPointer>
|
||||||
@ -110,7 +121,6 @@ public:
|
|||||||
void setCursor(struct wl_buffer *buffer, struct wl_cursor_image *image);
|
void setCursor(struct wl_buffer *buffer, struct wl_cursor_image *image);
|
||||||
|
|
||||||
struct wl_display *wl_display() const { return mDisplay; }
|
struct wl_display *wl_display() const { return mDisplay; }
|
||||||
struct wl_event_queue *wl_event_queue() const { return mEventQueue; }
|
|
||||||
struct ::wl_registry *wl_registry() { return object(); }
|
struct ::wl_registry *wl_registry() { return object(); }
|
||||||
|
|
||||||
const struct wl_compositor *wl_compositor() const { return mCompositor.object(); }
|
const struct wl_compositor *wl_compositor() const { return mCompositor.object(); }
|
||||||
@ -175,7 +185,6 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct wl_display *mDisplay;
|
struct wl_display *mDisplay;
|
||||||
struct wl_event_queue *mEventQueue;
|
|
||||||
QtWayland::wl_compositor mCompositor;
|
QtWayland::wl_compositor mCompositor;
|
||||||
QScopedPointer<QWaylandShm> mShm;
|
QScopedPointer<QWaylandShm> mShm;
|
||||||
QThread *mEventThread;
|
QThread *mEventThread;
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDDND_H
|
#ifndef QWAYLANDDND_H
|
||||||
#define QWAYLANDDND_H
|
#define QWAYLANDDND_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <qpa/qplatformdrag.h>
|
#include <qpa/qplatformdrag.h>
|
||||||
#include <QtGui/private/qsimpledrag_p.h>
|
#include <QtGui/private/qsimpledrag_p.h>
|
||||||
|
|
||||||
|
@ -80,13 +80,9 @@ void QWaylandEventThread::checkError() const
|
|||||||
|
|
||||||
void QWaylandEventThread::readWaylandEvents()
|
void QWaylandEventThread::readWaylandEvents()
|
||||||
{
|
{
|
||||||
if (wl_display_dispatch(m_display) < 0) {
|
if (wl_display_prepare_read(m_display) == 0) {
|
||||||
checkError();
|
wl_display_read_events(m_display);
|
||||||
m_readNotifier->setEnabled(false);
|
|
||||||
emit fatalError();
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
emit newEventsRead();
|
emit newEventsRead();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDEVENTTHREAD_H
|
#ifndef QWAYLANDEVENTTHREAD_H
|
||||||
#define QWAYLANDEVENTTHREAD_H
|
#define QWAYLANDEVENTTHREAD_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
#include <wayland-client.h>
|
#include <wayland-client.h>
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDEXTENDEDSURFACE_H
|
#ifndef QWAYLANDEXTENDEDSURFACE_H
|
||||||
#define QWAYLANDEXTENDEDSURFACE_H
|
#define QWAYLANDEXTENDEDSURFACE_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QtCore/QString>
|
#include <QtCore/QString>
|
||||||
#include <QtCore/QVariant>
|
#include <QtCore/QVariant>
|
||||||
|
|
||||||
|
@ -41,6 +41,17 @@
|
|||||||
#ifndef QWAYLANDINPUTCONTEXT_H
|
#ifndef QWAYLANDINPUTCONTEXT_H
|
||||||
#define QWAYLANDINPUTCONTEXT_H
|
#define QWAYLANDINPUTCONTEXT_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <qpa/qplatforminputcontext.h>
|
#include <qpa/qplatforminputcontext.h>
|
||||||
|
|
||||||
#include <QtWaylandClient/private/qwayland-text.h>
|
#include <QtWaylandClient/private/qwayland-text.h>
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDINPUTDEVICE_H
|
#ifndef QWAYLANDINPUTDEVICE_H
|
||||||
#define QWAYLANDINPUTDEVICE_H
|
#define QWAYLANDINPUTDEVICE_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QtWaylandClient/private/qwaylandwindow_p.h>
|
#include <QtWaylandClient/private/qwaylandwindow_p.h>
|
||||||
|
|
||||||
#include <QSocketNotifier>
|
#include <QSocketNotifier>
|
||||||
|
@ -128,14 +128,19 @@ QWaylandIntegration::QWaylandIntegration()
|
|||||||
mClipboard = new QWaylandClipboard(mDisplay);
|
mClipboard = new QWaylandClipboard(mDisplay);
|
||||||
mDrag = new QWaylandDrag(mDisplay);
|
mDrag = new QWaylandDrag(mDisplay);
|
||||||
|
|
||||||
//try to use the input context using the wl_text_input interface
|
QString icStr = QPlatformInputContextFactory::requested();
|
||||||
QPlatformInputContext *ctx = new QWaylandInputContext(mDisplay);
|
if (!icStr.isNull()) {
|
||||||
mInputContext.reset(ctx);
|
mInputContext.reset(QPlatformInputContextFactory::create(icStr));
|
||||||
|
} else {
|
||||||
//use the traditional way for on screen keyboards for now
|
//try to use the input context using the wl_text_input interface
|
||||||
if (!mInputContext.data()->isValid()) {
|
QPlatformInputContext *ctx = new QWaylandInputContext(mDisplay);
|
||||||
ctx = QPlatformInputContextFactory::create();
|
|
||||||
mInputContext.reset(ctx);
|
mInputContext.reset(ctx);
|
||||||
|
|
||||||
|
//use the traditional way for on screen keyboards for now
|
||||||
|
if (!mInputContext.data()->isValid()) {
|
||||||
|
ctx = QPlatformInputContextFactory::create();
|
||||||
|
mInputContext.reset(ctx);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QPLATFORMINTEGRATION_WAYLAND_H
|
#ifndef QPLATFORMINTEGRATION_WAYLAND_H
|
||||||
#define QPLATFORMINTEGRATION_WAYLAND_H
|
#define QPLATFORMINTEGRATION_WAYLAND_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <qpa/qplatformintegration.h>
|
#include <qpa/qplatformintegration.h>
|
||||||
|
|
||||||
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
||||||
|
@ -58,8 +58,6 @@ void *QWaylandNativeInterface::nativeResourceForIntegration(const QByteArray &re
|
|||||||
|
|
||||||
if (lowerCaseResource == "display" || lowerCaseResource == "wl_display" || lowerCaseResource == "nativedisplay")
|
if (lowerCaseResource == "display" || lowerCaseResource == "wl_display" || lowerCaseResource == "nativedisplay")
|
||||||
return m_integration->display()->wl_display();
|
return m_integration->display()->wl_display();
|
||||||
if (lowerCaseResource == "wl_event_queue")
|
|
||||||
return m_integration->display()->wl_event_queue();
|
|
||||||
if (lowerCaseResource == "compositor")
|
if (lowerCaseResource == "compositor")
|
||||||
return const_cast<wl_compositor *>(m_integration->display()->wl_compositor());
|
return const_cast<wl_compositor *>(m_integration->display()->wl_compositor());
|
||||||
if (lowerCaseResource == "server_buffer_integration")
|
if (lowerCaseResource == "server_buffer_integration")
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDNATIVEINTERFACE_H
|
#ifndef QWAYLANDNATIVEINTERFACE_H
|
||||||
#define QWAYLANDNATIVEINTERFACE_H
|
#define QWAYLANDNATIVEINTERFACE_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QVariantMap>
|
#include <QVariantMap>
|
||||||
#include <qpa/qplatformnativeinterface.h>
|
#include <qpa/qplatformnativeinterface.h>
|
||||||
|
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDQTKEY_H
|
#ifndef QWAYLANDQTKEY_H
|
||||||
#define QWAYLANDQTKEY_H
|
#define QWAYLANDQTKEY_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <qpa/qwindowsysteminterface.h>
|
#include <qpa/qwindowsysteminterface.h>
|
||||||
|
|
||||||
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDSCREEN_H
|
#ifndef QWAYLANDSCREEN_H
|
||||||
#define QWAYLANDSCREEN_H
|
#define QWAYLANDSCREEN_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <qpa/qplatformscreen.h>
|
#include <qpa/qplatformscreen.h>
|
||||||
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
||||||
|
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDSHELLSURFACE_H
|
#ifndef QWAYLANDSHELLSURFACE_H
|
||||||
#define QWAYLANDSHELLSURFACE_H
|
#define QWAYLANDSHELLSURFACE_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QtCore/QSize>
|
#include <QtCore/QSize>
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
|
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDSHMBACKINGSTORE_H
|
#ifndef QWAYLANDSHMBACKINGSTORE_H
|
||||||
#define QWAYLANDSHMBACKINGSTORE_H
|
#define QWAYLANDSHMBACKINGSTORE_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QtWaylandClient/private/qwaylandbuffer_p.h>
|
#include <QtWaylandClient/private/qwaylandbuffer_p.h>
|
||||||
|
|
||||||
#include <qpa/qplatformbackingstore.h>
|
#include <qpa/qplatformbackingstore.h>
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDSHMWINDOW_H
|
#ifndef QWAYLANDSHMWINDOW_H
|
||||||
#define QWAYLANDSHMWINDOW_H
|
#define QWAYLANDSHMWINDOW_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QtWaylandClient/private/qwaylandwindow_p.h>
|
#include <QtWaylandClient/private/qwaylandwindow_p.h>
|
||||||
#include <QtGui/QRegion>
|
#include <QtGui/QRegion>
|
||||||
|
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDSUBSURFACE_H
|
#ifndef QWAYLANDSUBSURFACE_H
|
||||||
#define QWAYLANDSUBSURFACE_H
|
#define QWAYLANDSUBSURFACE_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <wayland-client.h>
|
#include <wayland-client.h>
|
||||||
|
|
||||||
#include <QtCore/qglobal.h>
|
#include <QtCore/qglobal.h>
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDTOUCH_H
|
#ifndef QWAYLANDTOUCH_H
|
||||||
#define QWAYLANDTOUCH_H
|
#define QWAYLANDTOUCH_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <qpa/qwindowsysteminterface.h>
|
#include <qpa/qwindowsysteminterface.h>
|
||||||
|
|
||||||
#include <QtWaylandClient/private/qwayland-touch-extension.h>
|
#include <QtWaylandClient/private/qwayland-touch-extension.h>
|
||||||
|
@ -156,7 +156,8 @@ void QWaylandWindow::initWindow()
|
|||||||
mShellSurface->updateTransientParent(window()->transientParent());
|
mShellSurface->updateTransientParent(window()->transientParent());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
mShellSurface->setTopLevel();
|
if (window()->type() != Qt::ToolTip)
|
||||||
|
mShellSurface->setTopLevel();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -266,17 +267,18 @@ void QWaylandWindow::setGeometry(const QRect &rect)
|
|||||||
void QWaylandWindow::setVisible(bool visible)
|
void QWaylandWindow::setVisible(bool visible)
|
||||||
{
|
{
|
||||||
if (visible) {
|
if (visible) {
|
||||||
if (window()->type() == Qt::Popup) {
|
if (mShellSurface) {
|
||||||
QWaylandWindow *parent = transientParent();
|
if (window()->type() == Qt::Popup) {
|
||||||
if (!parent) {
|
QWaylandWindow *parent = transientParent();
|
||||||
// Try with the current focus window. It should be the right one and anyway
|
if (parent) {
|
||||||
// better than having no parent at all.
|
QWaylandWlShellSurface *wlshellSurface = qobject_cast<QWaylandWlShellSurface*>(mShellSurface);
|
||||||
parent = mDisplay->lastInputWindow();
|
if (wlshellSurface)
|
||||||
}
|
wlshellSurface->setPopup(parent, mDisplay->lastInputDevice(), mDisplay->lastInputSerial());
|
||||||
if (parent) {
|
}
|
||||||
QWaylandWlShellSurface *wlshellSurface = qobject_cast<QWaylandWlShellSurface*>(mShellSurface);
|
} else if (window()->type() == Qt::ToolTip) {
|
||||||
if (wlshellSurface)
|
if (QWaylandWindow *parent = transientParent()) {
|
||||||
wlshellSurface->setPopup(parent, mDisplay->lastInputDevice(), mDisplay->lastInputSerial());
|
mShellSurface->updateTransientParent(parent->window());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -643,7 +645,9 @@ QWaylandWindow *QWaylandWindow::transientParent() const
|
|||||||
// events.
|
// events.
|
||||||
return static_cast<QWaylandWindow *>(topLevelWindow(window()->transientParent())->handle());
|
return static_cast<QWaylandWindow *>(topLevelWindow(window()->transientParent())->handle());
|
||||||
}
|
}
|
||||||
return 0;
|
// Try with the current focus window. It should be the right one and anyway
|
||||||
|
// better than having no parent at all.
|
||||||
|
return mDisplay->lastInputWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QWaylandWindow::handleMouse(QWaylandInputDevice *inputDevice, const QWaylandPointerEvent &e)
|
void QWaylandWindow::handleMouse(QWaylandInputDevice *inputDevice, const QWaylandPointerEvent &e)
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDWINDOW_H
|
#ifndef QWAYLANDWINDOW_H
|
||||||
#define QWAYLANDWINDOW_H
|
#define QWAYLANDWINDOW_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QtCore/QWaitCondition>
|
#include <QtCore/QWaitCondition>
|
||||||
#include <QtCore/QMutex>
|
#include <QtCore/QMutex>
|
||||||
#include <QtGui/QIcon>
|
#include <QtGui/QIcon>
|
||||||
|
@ -127,28 +127,33 @@ QByteArray QWaylandWindowManagerIntegration::desktopEnvironment() const
|
|||||||
|
|
||||||
void QWaylandWindowManagerIntegration::openUrl_helper(const QUrl &url)
|
void QWaylandWindowManagerIntegration::openUrl_helper(const QUrl &url)
|
||||||
{
|
{
|
||||||
if (isInitialized()) {
|
Q_ASSERT(isInitialized());
|
||||||
QByteArray data = url.toString().toUtf8();
|
QByteArray data = url.toString().toUtf8();
|
||||||
|
|
||||||
static const int chunkSize = 128;
|
static const int chunkSize = 128;
|
||||||
while (!data.isEmpty()) {
|
while (!data.isEmpty()) {
|
||||||
QByteArray chunk = data.left(chunkSize);
|
QByteArray chunk = data.left(chunkSize);
|
||||||
data = data.mid(chunkSize);
|
data = data.mid(chunkSize);
|
||||||
open_url(!data.isEmpty(), QString::fromUtf8(chunk));
|
open_url(!data.isEmpty(), QString::fromUtf8(chunk));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QWaylandWindowManagerIntegration::openUrl(const QUrl &url)
|
bool QWaylandWindowManagerIntegration::openUrl(const QUrl &url)
|
||||||
{
|
{
|
||||||
openUrl_helper(url);
|
if (isInitialized()) {
|
||||||
return true;
|
openUrl_helper(url);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return QGenericUnixServices::openUrl(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QWaylandWindowManagerIntegration::openDocument(const QUrl &url)
|
bool QWaylandWindowManagerIntegration::openDocument(const QUrl &url)
|
||||||
{
|
{
|
||||||
openUrl_helper(url);
|
if (isInitialized()) {
|
||||||
return true;
|
openUrl_helper(url);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return QGenericUnixServices::openDocument(url);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -34,11 +34,22 @@
|
|||||||
#ifndef QWAYLANDWINDOWMANAGERINTEGRATION_H
|
#ifndef QWAYLANDWINDOWMANAGERINTEGRATION_H
|
||||||
#define QWAYLANDWINDOWMANAGERINTEGRATION_H
|
#define QWAYLANDWINDOWMANAGERINTEGRATION_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QtCore/QObject>
|
#include <QtCore/QObject>
|
||||||
#include <QtCore/QScopedPointer>
|
#include <QtCore/QScopedPointer>
|
||||||
|
|
||||||
#include <wayland-client.h>
|
#include <wayland-client.h>
|
||||||
#include <qpa/qplatformservices.h>
|
#include <QtPlatformSupport/private/qgenericunixservices_p.h>
|
||||||
|
|
||||||
#include <QtWaylandClient/private/qwayland-windowmanager.h>
|
#include <QtWaylandClient/private/qwayland-windowmanager.h>
|
||||||
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
||||||
@ -52,7 +63,7 @@ class QWaylandDisplay;
|
|||||||
|
|
||||||
class QWaylandWindowManagerIntegrationPrivate;
|
class QWaylandWindowManagerIntegrationPrivate;
|
||||||
|
|
||||||
class Q_WAYLAND_CLIENT_EXPORT QWaylandWindowManagerIntegration : public QObject, public QPlatformServices, public QtWayland::qt_windowmanager
|
class Q_WAYLAND_CLIENT_EXPORT QWaylandWindowManagerIntegration : public QObject, public QGenericUnixServices, public QtWayland::qt_windowmanager
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_DECLARE_PRIVATE(QWaylandWindowManagerIntegration)
|
Q_DECLARE_PRIVATE(QWaylandWindowManagerIntegration)
|
||||||
|
@ -47,8 +47,8 @@ QT_BEGIN_NAMESPACE
|
|||||||
namespace QtWaylandClient {
|
namespace QtWaylandClient {
|
||||||
|
|
||||||
QWaylandWlShellSurface::QWaylandWlShellSurface(struct ::wl_shell_surface *shell_surface, QWaylandWindow *window)
|
QWaylandWlShellSurface::QWaylandWlShellSurface(struct ::wl_shell_surface *shell_surface, QWaylandWindow *window)
|
||||||
: QtWayland::wl_shell_surface(shell_surface)
|
: QWaylandShellSurface(window)
|
||||||
, QWaylandShellSurface(window)
|
, QtWayland::wl_shell_surface(shell_surface)
|
||||||
, m_window(window)
|
, m_window(window)
|
||||||
, m_maximized(false)
|
, m_maximized(false)
|
||||||
, m_fullscreen(false)
|
, m_fullscreen(false)
|
||||||
@ -159,8 +159,7 @@ void QWaylandWlShellSurface::updateTransientParent(QWindow *parent)
|
|||||||
|
|
||||||
// set_transient expects a position relative to the parent
|
// set_transient expects a position relative to the parent
|
||||||
QPoint transientPos = m_window->geometry().topLeft(); // this is absolute
|
QPoint transientPos = m_window->geometry().topLeft(); // this is absolute
|
||||||
QWindow *parentWin = m_window->window()->transientParent();
|
transientPos -= parent->geometry().topLeft();
|
||||||
transientPos -= parentWin->geometry().topLeft();
|
|
||||||
if (parent_wayland_window->decoration()) {
|
if (parent_wayland_window->decoration()) {
|
||||||
transientPos.setX(transientPos.x() + parent_wayland_window->decoration()->margins().left());
|
transientPos.setX(transientPos.x() + parent_wayland_window->decoration()->margins().left());
|
||||||
transientPos.setY(transientPos.y() + parent_wayland_window->decoration()->margins().top());
|
transientPos.setY(transientPos.y() + parent_wayland_window->decoration()->margins().top());
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDWLSHELLSURFACE_H
|
#ifndef QWAYLANDWLSHELLSURFACE_H
|
||||||
#define QWAYLANDWLSHELLSURFACE_H
|
#define QWAYLANDWLSHELLSURFACE_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QtCore/QSize>
|
#include <QtCore/QSize>
|
||||||
|
|
||||||
#include <wayland-client.h>
|
#include <wayland-client.h>
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDXDGSHELL_H
|
#ifndef QWAYLANDXDGSHELL_H
|
||||||
#define QWAYLANDXDGSHELL_H
|
#define QWAYLANDXDGSHELL_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QtCore/QSize>
|
#include <QtCore/QSize>
|
||||||
|
|
||||||
#include <wayland-client.h>
|
#include <wayland-client.h>
|
||||||
|
@ -46,8 +46,8 @@ QT_BEGIN_NAMESPACE
|
|||||||
namespace QtWaylandClient {
|
namespace QtWaylandClient {
|
||||||
|
|
||||||
QWaylandXdgSurface::QWaylandXdgSurface(struct ::xdg_surface *xdg_surface, QWaylandWindow *window)
|
QWaylandXdgSurface::QWaylandXdgSurface(struct ::xdg_surface *xdg_surface, QWaylandWindow *window)
|
||||||
: QtWayland::xdg_surface(xdg_surface)
|
: QWaylandShellSurface(window)
|
||||||
, QWaylandShellSurface(window)
|
, QtWayland::xdg_surface(xdg_surface)
|
||||||
, m_window(window)
|
, m_window(window)
|
||||||
, m_maximized(false)
|
, m_maximized(false)
|
||||||
, m_minimized(false)
|
, m_minimized(false)
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDXDGSURFACE_H
|
#ifndef QWAYLANDXDGSURFACE_H
|
||||||
#define QWAYLANDXDGSURFACE_H
|
#define QWAYLANDXDGSURFACE_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QtCore/QSize>
|
#include <QtCore/QSize>
|
||||||
#include <QtCore/QMargins>
|
#include <QtCore/QMargins>
|
||||||
|
|
||||||
|
@ -135,6 +135,8 @@ static const uint32_t KeyTbl[] = {
|
|||||||
|
|
||||||
XKB_KEY_XF86Eject, Qt::Key_Eject,
|
XKB_KEY_XF86Eject, Qt::Key_Eject,
|
||||||
|
|
||||||
|
XKB_KEY_XF86Phone, Qt::Key_ToggleCallHangup,
|
||||||
|
|
||||||
0, 0
|
0, 0
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDSHELLINTEGRATION_H
|
#ifndef QWAYLANDSHELLINTEGRATION_H
|
||||||
#define QWAYLANDSHELLINTEGRATION_H
|
#define QWAYLANDSHELLINTEGRATION_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QtCore/qglobal.h>
|
#include <QtCore/qglobal.h>
|
||||||
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
||||||
|
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDSHELLINTEGRATIONFACTORY_H
|
#ifndef QWAYLANDSHELLINTEGRATIONFACTORY_H
|
||||||
#define QWAYLANDSHELLINTEGRATIONFACTORY_H
|
#define QWAYLANDSHELLINTEGRATIONFACTORY_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
||||||
#include <QtCore/QStringList>
|
#include <QtCore/QStringList>
|
||||||
|
|
||||||
|
@ -34,6 +34,17 @@
|
|||||||
#ifndef QWAYLANDSHELLINTEGRATIONPLUGIN_H
|
#ifndef QWAYLANDSHELLINTEGRATIONPLUGIN_H
|
||||||
#define QWAYLANDSHELLINTEGRATIONPLUGIN_H
|
#define QWAYLANDSHELLINTEGRATIONPLUGIN_H
|
||||||
|
|
||||||
|
//
|
||||||
|
// W A R N I N G
|
||||||
|
// -------------
|
||||||
|
//
|
||||||
|
// This file is not part of the Qt API. It exists purely as an
|
||||||
|
// implementation detail. This header file may change from version to
|
||||||
|
// version without notice, or even be removed.
|
||||||
|
//
|
||||||
|
// We mean it.
|
||||||
|
//
|
||||||
|
|
||||||
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
||||||
|
|
||||||
#include <QtCore/qplugin.h>
|
#include <QtCore/qplugin.h>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user