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
|
||||
#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 <QtWaylandClient/private/qwaylandclientexport_p.h>
|
||||
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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 <QtCore/QStringList>
|
||||
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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 <QtCore/qplugin.h>
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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/qwaylandclientexport_p.h>
|
||||
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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 <QtGui/qopengl.h>
|
||||
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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 <QtCore/QStringList>
|
||||
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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 <QtCore/qplugin.h>
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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 <QtWaylandClient/private/qwaylandclientexport_p.h>
|
||||
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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 <QtCore/QStringList>
|
||||
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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 <QtCore/qplugin.h>
|
||||
|
@ -35,6 +35,17 @@
|
||||
#ifndef 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/QPointF>
|
||||
#include <QtGui/QGuiApplication>
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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 <QtCore/QSize>
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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 <QtCore/QVariant>
|
||||
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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 <QtCore/QMap>
|
||||
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
||||
|
@ -41,6 +41,17 @@
|
||||
#ifndef 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 <QPoint>
|
||||
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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/qwayland-wayland.h>
|
||||
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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 <QtWaylandClient/private/qwaylandclientexport_p.h>
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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 <QtWaylandClient/private/qwayland-wayland.h>
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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 <QtCore/QStringList>
|
||||
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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 <QtCore/qplugin.h>
|
||||
|
@ -154,12 +154,7 @@ QWaylandDisplay::QWaylandDisplay(QWaylandIntegration *waylandIntegration)
|
||||
mEventThreadObject->displayConnect();
|
||||
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);
|
||||
wl_proxy_set_queue((struct wl_proxy *)registry, mEventQueue);
|
||||
|
||||
init(registry);
|
||||
|
||||
connect(mEventThreadObject, SIGNAL(newEventsRead()), this, SLOT(flushRequests()));
|
||||
@ -187,7 +182,7 @@ QWaylandDisplay::~QWaylandDisplay(void)
|
||||
|
||||
void QWaylandDisplay::flushRequests()
|
||||
{
|
||||
if (wl_display_dispatch_queue_pending(mDisplay, mEventQueue) < 0) {
|
||||
if (wl_display_dispatch_pending(mDisplay) < 0) {
|
||||
mEventThreadObject->checkError();
|
||||
exitWithError();
|
||||
}
|
||||
@ -198,7 +193,7 @@ void QWaylandDisplay::flushRequests()
|
||||
|
||||
void QWaylandDisplay::blockingReadEvents()
|
||||
{
|
||||
if (wl_display_dispatch_queue(mDisplay, mEventQueue) < 0) {
|
||||
if (wl_display_dispatch(mDisplay) < 0) {
|
||||
mEventThreadObject->checkError();
|
||||
exitWithError();
|
||||
}
|
||||
@ -206,6 +201,8 @@ void QWaylandDisplay::blockingReadEvents()
|
||||
|
||||
void QWaylandDisplay::exitWithError()
|
||||
{
|
||||
mEventThread->quit();
|
||||
mEventThread->wait();
|
||||
::exit(1);
|
||||
}
|
||||
|
||||
@ -348,17 +345,16 @@ void QWaylandDisplay::forceRoundTrip()
|
||||
int ret = 0;
|
||||
bool done = false;
|
||||
wl_callback *callback = wl_display_sync(mDisplay);
|
||||
wl_proxy_set_queue((struct wl_proxy *)callback, mEventQueue);
|
||||
wl_callback_add_listener(callback, &sync_listener, &done);
|
||||
flushRequests();
|
||||
if (QThread::currentThread()->eventDispatcher()) {
|
||||
while (!done && ret >= 0) {
|
||||
QThread::currentThread()->eventDispatcher()->processEvents(QEventLoop::WaitForMoreEvents);
|
||||
ret = wl_display_dispatch_queue_pending(mDisplay, mEventQueue);
|
||||
ret = wl_display_dispatch_pending(mDisplay);
|
||||
}
|
||||
} else {
|
||||
while (!done && ret >= 0)
|
||||
ret = wl_display_dispatch_queue(mDisplay, mEventQueue);
|
||||
ret = wl_display_dispatch(mDisplay);
|
||||
}
|
||||
|
||||
if (ret == -1 && !done)
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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/QRect>
|
||||
#include <QtCore/QPointer>
|
||||
@ -110,7 +121,6 @@ public:
|
||||
void setCursor(struct wl_buffer *buffer, struct wl_cursor_image *image);
|
||||
|
||||
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(); }
|
||||
|
||||
const struct wl_compositor *wl_compositor() const { return mCompositor.object(); }
|
||||
@ -175,7 +185,6 @@ private:
|
||||
};
|
||||
|
||||
struct wl_display *mDisplay;
|
||||
struct wl_event_queue *mEventQueue;
|
||||
QtWayland::wl_compositor mCompositor;
|
||||
QScopedPointer<QWaylandShm> mShm;
|
||||
QThread *mEventThread;
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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 <QtGui/private/qsimpledrag_p.h>
|
||||
|
||||
|
@ -80,13 +80,9 @@ void QWaylandEventThread::checkError() const
|
||||
|
||||
void QWaylandEventThread::readWaylandEvents()
|
||||
{
|
||||
if (wl_display_dispatch(m_display) < 0) {
|
||||
checkError();
|
||||
m_readNotifier->setEnabled(false);
|
||||
emit fatalError();
|
||||
return;
|
||||
if (wl_display_prepare_read(m_display) == 0) {
|
||||
wl_display_read_events(m_display);
|
||||
}
|
||||
|
||||
emit newEventsRead();
|
||||
}
|
||||
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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 <QMutex>
|
||||
#include <wayland-client.h>
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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/QVariant>
|
||||
|
||||
|
@ -41,6 +41,17 @@
|
||||
#ifndef 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 <QtWaylandClient/private/qwayland-text.h>
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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 <QSocketNotifier>
|
||||
|
@ -128,6 +128,10 @@ QWaylandIntegration::QWaylandIntegration()
|
||||
mClipboard = new QWaylandClipboard(mDisplay);
|
||||
mDrag = new QWaylandDrag(mDisplay);
|
||||
|
||||
QString icStr = QPlatformInputContextFactory::requested();
|
||||
if (!icStr.isNull()) {
|
||||
mInputContext.reset(QPlatformInputContextFactory::create(icStr));
|
||||
} else {
|
||||
//try to use the input context using the wl_text_input interface
|
||||
QPlatformInputContext *ctx = new QWaylandInputContext(mDisplay);
|
||||
mInputContext.reset(ctx);
|
||||
@ -138,6 +142,7 @@ QWaylandIntegration::QWaylandIntegration()
|
||||
mInputContext.reset(ctx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QWaylandIntegration::~QWaylandIntegration()
|
||||
{
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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 <QtWaylandClient/private/qwaylandclientexport_p.h>
|
||||
|
@ -58,8 +58,6 @@ void *QWaylandNativeInterface::nativeResourceForIntegration(const QByteArray &re
|
||||
|
||||
if (lowerCaseResource == "display" || lowerCaseResource == "wl_display" || lowerCaseResource == "nativedisplay")
|
||||
return m_integration->display()->wl_display();
|
||||
if (lowerCaseResource == "wl_event_queue")
|
||||
return m_integration->display()->wl_event_queue();
|
||||
if (lowerCaseResource == "compositor")
|
||||
return const_cast<wl_compositor *>(m_integration->display()->wl_compositor());
|
||||
if (lowerCaseResource == "server_buffer_integration")
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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 <qpa/qplatformnativeinterface.h>
|
||||
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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 <QtWaylandClient/private/qwaylandclientexport_p.h>
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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 <QtWaylandClient/private/qwaylandclientexport_p.h>
|
||||
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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 <QObject>
|
||||
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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 <qpa/qplatformbackingstore.h>
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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 <QtGui/QRegion>
|
||||
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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 <QtCore/qglobal.h>
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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 <QtWaylandClient/private/qwayland-touch-extension.h>
|
||||
|
@ -156,6 +156,7 @@ void QWaylandWindow::initWindow()
|
||||
mShellSurface->updateTransientParent(window()->transientParent());
|
||||
}
|
||||
} else {
|
||||
if (window()->type() != Qt::ToolTip)
|
||||
mShellSurface->setTopLevel();
|
||||
}
|
||||
}
|
||||
@ -266,18 +267,19 @@ void QWaylandWindow::setGeometry(const QRect &rect)
|
||||
void QWaylandWindow::setVisible(bool visible)
|
||||
{
|
||||
if (visible) {
|
||||
if (mShellSurface) {
|
||||
if (window()->type() == Qt::Popup) {
|
||||
QWaylandWindow *parent = transientParent();
|
||||
if (!parent) {
|
||||
// Try with the current focus window. It should be the right one and anyway
|
||||
// better than having no parent at all.
|
||||
parent = mDisplay->lastInputWindow();
|
||||
}
|
||||
if (parent) {
|
||||
QWaylandWlShellSurface *wlshellSurface = qobject_cast<QWaylandWlShellSurface*>(mShellSurface);
|
||||
if (wlshellSurface)
|
||||
wlshellSurface->setPopup(parent, mDisplay->lastInputDevice(), mDisplay->lastInputSerial());
|
||||
}
|
||||
} else if (window()->type() == Qt::ToolTip) {
|
||||
if (QWaylandWindow *parent = transientParent()) {
|
||||
mShellSurface->updateTransientParent(parent->window());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
setGeometry(window()->geometry());
|
||||
@ -643,7 +645,9 @@ QWaylandWindow *QWaylandWindow::transientParent() const
|
||||
// events.
|
||||
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)
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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/QMutex>
|
||||
#include <QtGui/QIcon>
|
||||
|
@ -127,7 +127,7 @@ QByteArray QWaylandWindowManagerIntegration::desktopEnvironment() const
|
||||
|
||||
void QWaylandWindowManagerIntegration::openUrl_helper(const QUrl &url)
|
||||
{
|
||||
if (isInitialized()) {
|
||||
Q_ASSERT(isInitialized());
|
||||
QByteArray data = url.toString().toUtf8();
|
||||
|
||||
static const int chunkSize = 128;
|
||||
@ -137,19 +137,24 @@ void QWaylandWindowManagerIntegration::openUrl_helper(const QUrl &url)
|
||||
open_url(!data.isEmpty(), QString::fromUtf8(chunk));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool QWaylandWindowManagerIntegration::openUrl(const QUrl &url)
|
||||
{
|
||||
if (isInitialized()) {
|
||||
openUrl_helper(url);
|
||||
return true;
|
||||
}
|
||||
return QGenericUnixServices::openUrl(url);
|
||||
}
|
||||
|
||||
bool QWaylandWindowManagerIntegration::openDocument(const QUrl &url)
|
||||
{
|
||||
if (isInitialized()) {
|
||||
openUrl_helper(url);
|
||||
return true;
|
||||
}
|
||||
return QGenericUnixServices::openDocument(url);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -34,11 +34,22 @@
|
||||
#ifndef 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/QScopedPointer>
|
||||
|
||||
#include <wayland-client.h>
|
||||
#include <qpa/qplatformservices.h>
|
||||
#include <QtPlatformSupport/private/qgenericunixservices_p.h>
|
||||
|
||||
#include <QtWaylandClient/private/qwayland-windowmanager.h>
|
||||
#include <QtWaylandClient/private/qwaylandclientexport_p.h>
|
||||
@ -52,7 +63,7 @@ class QWaylandDisplay;
|
||||
|
||||
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_DECLARE_PRIVATE(QWaylandWindowManagerIntegration)
|
||||
|
@ -47,8 +47,8 @@ QT_BEGIN_NAMESPACE
|
||||
namespace QtWaylandClient {
|
||||
|
||||
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_maximized(false)
|
||||
, m_fullscreen(false)
|
||||
@ -159,8 +159,7 @@ void QWaylandWlShellSurface::updateTransientParent(QWindow *parent)
|
||||
|
||||
// set_transient expects a position relative to the parent
|
||||
QPoint transientPos = m_window->geometry().topLeft(); // this is absolute
|
||||
QWindow *parentWin = m_window->window()->transientParent();
|
||||
transientPos -= parentWin->geometry().topLeft();
|
||||
transientPos -= parent->geometry().topLeft();
|
||||
if (parent_wayland_window->decoration()) {
|
||||
transientPos.setX(transientPos.x() + parent_wayland_window->decoration()->margins().left());
|
||||
transientPos.setY(transientPos.y() + parent_wayland_window->decoration()->margins().top());
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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 <wayland-client.h>
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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 <wayland-client.h>
|
||||
|
@ -46,8 +46,8 @@ QT_BEGIN_NAMESPACE
|
||||
namespace QtWaylandClient {
|
||||
|
||||
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_maximized(false)
|
||||
, m_minimized(false)
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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/QMargins>
|
||||
|
||||
|
@ -135,6 +135,8 @@ static const uint32_t KeyTbl[] = {
|
||||
|
||||
XKB_KEY_XF86Eject, Qt::Key_Eject,
|
||||
|
||||
XKB_KEY_XF86Phone, Qt::Key_ToggleCallHangup,
|
||||
|
||||
0, 0
|
||||
};
|
||||
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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 <QtWaylandClient/private/qwaylandclientexport_p.h>
|
||||
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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 <QtCore/QStringList>
|
||||
|
||||
|
@ -34,6 +34,17 @@
|
||||
#ifndef 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 <QtCore/qplugin.h>
|
||||
|
Loading…
x
Reference in New Issue
Block a user