Merge remote-tracking branch 'origin/5.8' into dev
Conflicts: .qmake.conf examples/wayland/custom-extension/client-common/main.cpp src/client/qwaylandwlshellintegration_p.h src/client/qwaylandxdgshellintegration_p.h src/compositor/compositor_api/qwaylandquickoutput.h src/plugins/shellintegration/ivi-shell/qwaylandivisurface_p.h Change-Id: Ic78c610ddf102b0a185294f625bbfcb9238b0f3c
This commit is contained in:
commit
9fc54bf67c
@ -18,7 +18,7 @@ CONFIG += link_pkgconfig wayland-scanner
|
|||||||
qtConfig(xkbcommon-evdev): \
|
qtConfig(xkbcommon-evdev): \
|
||||||
QMAKE_USE_PRIVATE += xkbcommon_evdev
|
QMAKE_USE_PRIVATE += xkbcommon_evdev
|
||||||
|
|
||||||
QMAKE_USE += wayland-client wayland-cursor
|
QMAKE_USE += wayland-client
|
||||||
|
|
||||||
INCLUDEPATH += $$PWD/../shared
|
INCLUDEPATH += $$PWD/../shared
|
||||||
|
|
||||||
@ -36,13 +36,10 @@ SOURCES += qwaylandintegration.cpp \
|
|||||||
qwaylandnativeinterface.cpp \
|
qwaylandnativeinterface.cpp \
|
||||||
qwaylandshmbackingstore.cpp \
|
qwaylandshmbackingstore.cpp \
|
||||||
qwaylandinputdevice.cpp \
|
qwaylandinputdevice.cpp \
|
||||||
qwaylandcursor.cpp \
|
|
||||||
qwaylanddisplay.cpp \
|
qwaylanddisplay.cpp \
|
||||||
qwaylandwindow.cpp \
|
qwaylandwindow.cpp \
|
||||||
qwaylandscreen.cpp \
|
qwaylandscreen.cpp \
|
||||||
qwaylandshmwindow.cpp \
|
qwaylandshmwindow.cpp \
|
||||||
qwaylandclipboard.cpp \
|
|
||||||
qwaylanddnd.cpp \
|
|
||||||
qwaylanddataoffer.cpp \
|
qwaylanddataoffer.cpp \
|
||||||
qwaylanddatadevicemanager.cpp \
|
qwaylanddatadevicemanager.cpp \
|
||||||
qwaylanddatasource.cpp \
|
qwaylanddatasource.cpp \
|
||||||
@ -67,13 +64,11 @@ SOURCES += qwaylandintegration.cpp \
|
|||||||
qwaylanddecorationplugin.cpp \
|
qwaylanddecorationplugin.cpp \
|
||||||
qwaylandwindowmanagerintegration.cpp \
|
qwaylandwindowmanagerintegration.cpp \
|
||||||
qwaylandinputcontext.cpp \
|
qwaylandinputcontext.cpp \
|
||||||
qwaylanddatadevice.cpp \
|
|
||||||
qwaylandshm.cpp \
|
qwaylandshm.cpp \
|
||||||
qwaylandbuffer.cpp \
|
qwaylandbuffer.cpp \
|
||||||
|
|
||||||
HEADERS += qwaylandintegration_p.h \
|
HEADERS += qwaylandintegration_p.h \
|
||||||
qwaylandnativeinterface_p.h \
|
qwaylandnativeinterface_p.h \
|
||||||
qwaylandcursor_p.h \
|
|
||||||
qwaylanddisplay_p.h \
|
qwaylanddisplay_p.h \
|
||||||
qwaylandwindow_p.h \
|
qwaylandwindow_p.h \
|
||||||
qwaylandscreen_p.h \
|
qwaylandscreen_p.h \
|
||||||
@ -81,8 +76,6 @@ HEADERS += qwaylandintegration_p.h \
|
|||||||
qwaylandinputdevice_p.h \
|
qwaylandinputdevice_p.h \
|
||||||
qwaylandbuffer_p.h \
|
qwaylandbuffer_p.h \
|
||||||
qwaylandshmwindow_p.h \
|
qwaylandshmwindow_p.h \
|
||||||
qwaylandclipboard_p.h \
|
|
||||||
qwaylanddnd_p.h \
|
|
||||||
qwaylanddataoffer_p.h \
|
qwaylanddataoffer_p.h \
|
||||||
qwaylanddatadevicemanager_p.h \
|
qwaylanddatadevicemanager_p.h \
|
||||||
qwaylanddatasource_p.h \
|
qwaylanddatasource_p.h \
|
||||||
@ -104,7 +97,6 @@ HEADERS += qwaylandintegration_p.h \
|
|||||||
qwaylanddecorationplugin_p.h \
|
qwaylanddecorationplugin_p.h \
|
||||||
qwaylandwindowmanagerintegration_p.h \
|
qwaylandwindowmanagerintegration_p.h \
|
||||||
qwaylandinputcontext_p.h \
|
qwaylandinputcontext_p.h \
|
||||||
qwaylanddatadevice_p.h \
|
|
||||||
qwaylandshm_p.h \
|
qwaylandshm_p.h \
|
||||||
qtwaylandclientglobal.h \
|
qtwaylandclientglobal.h \
|
||||||
qtwaylandclientglobal_p.h \
|
qtwaylandclientglobal_p.h \
|
||||||
@ -113,11 +105,33 @@ HEADERS += qwaylandintegration_p.h \
|
|||||||
../shared/qwaylandxkb_p.h \
|
../shared/qwaylandxkb_p.h \
|
||||||
../shared/qwaylandsharedmemoryformathelper_p.h \
|
../shared/qwaylandsharedmemoryformathelper_p.h \
|
||||||
|
|
||||||
|
qtConfig(clipboard) {
|
||||||
|
HEADERS += qwaylandclipboard_p.h
|
||||||
|
SOURCES += qwaylandclipboard.cpp
|
||||||
|
}
|
||||||
|
|
||||||
include(hardwareintegration/hardwareintegration.pri)
|
include(hardwareintegration/hardwareintegration.pri)
|
||||||
include(shellintegration/shellintegration.pri)
|
include(shellintegration/shellintegration.pri)
|
||||||
include(inputdeviceintegration/inputdeviceintegration.pri)
|
include(inputdeviceintegration/inputdeviceintegration.pri)
|
||||||
include(global/global.pri)
|
include(global/global.pri)
|
||||||
|
|
||||||
|
qtConfig(cursor) {
|
||||||
|
QMAKE_USE += wayland-cursor
|
||||||
|
|
||||||
|
HEADERS += \
|
||||||
|
qwaylandcursor_p.h
|
||||||
|
SOURCES += \
|
||||||
|
qwaylandcursor.cpp
|
||||||
|
}
|
||||||
|
qtConfig(draganddrop) {
|
||||||
|
HEADERS += \
|
||||||
|
qwaylanddnd_p.h \
|
||||||
|
qwaylanddatadevice_p.h
|
||||||
|
SOURCES += \
|
||||||
|
qwaylanddnd.cpp \
|
||||||
|
qwaylanddatadevice.cpp
|
||||||
|
}
|
||||||
|
|
||||||
CONFIG += generated_privates
|
CONFIG += generated_privates
|
||||||
MODULE_PLUGIN_TYPES = \
|
MODULE_PLUGIN_TYPES = \
|
||||||
wayland-graphics-integration-client \
|
wayland-graphics-integration-client \
|
||||||
|
@ -87,7 +87,7 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct wl_interface *extensionInterface() const Q_DECL_OVERRIDE
|
const struct wl_interface *extensionInterface() const override
|
||||||
{
|
{
|
||||||
return T::interface();
|
return T::interface();
|
||||||
}
|
}
|
||||||
|
@ -69,8 +69,8 @@ public:
|
|||||||
QString serverBufferIntegration();
|
QString serverBufferIntegration();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void hardware_integration_client_backend(const QString &name) Q_DECL_OVERRIDE;
|
void hardware_integration_client_backend(const QString &name) override;
|
||||||
void hardware_integration_server_backend(const QString &name) Q_DECL_OVERRIDE;
|
void hardware_integration_server_backend(const QString &name) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_client_buffer;
|
QString m_client_buffer;
|
||||||
|
@ -8,4 +8,5 @@ SOURCES += main.cpp
|
|||||||
QMAKE_USE += wayland-client
|
QMAKE_USE += wayland-client
|
||||||
|
|
||||||
PLUGIN_TYPE = wayland-decoration-client
|
PLUGIN_TYPE = wayland-decoration-client
|
||||||
|
PLUGIN_CLASS_NAME = QWaylandBradientDecorationPlugin
|
||||||
load(qt_plugin)
|
load(qt_plugin)
|
||||||
|
@ -135,10 +135,10 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandBradientDecoration : public QWaylandAbstra
|
|||||||
public:
|
public:
|
||||||
QWaylandBradientDecoration();
|
QWaylandBradientDecoration();
|
||||||
protected:
|
protected:
|
||||||
QMargins margins() const Q_DECL_OVERRIDE;
|
QMargins margins() const override;
|
||||||
void paint(QPaintDevice *device) Q_DECL_OVERRIDE;
|
void paint(QPaintDevice *device) override;
|
||||||
bool handleMouse(QWaylandInputDevice *inputDevice, const QPointF &local, const QPointF &global,Qt::MouseButtons b,Qt::KeyboardModifiers mods) Q_DECL_OVERRIDE;
|
bool handleMouse(QWaylandInputDevice *inputDevice, const QPointF &local, const QPointF &global,Qt::MouseButtons b,Qt::KeyboardModifiers mods) override;
|
||||||
bool handleTouch(QWaylandInputDevice *inputDevice, const QPointF &local, const QPointF &global, Qt::TouchPointState state, Qt::KeyboardModifiers mods) Q_DECL_OVERRIDE;
|
bool handleTouch(QWaylandInputDevice *inputDevice, const QPointF &local, const QPointF &global, Qt::TouchPointState state, Qt::KeyboardModifiers mods) override;
|
||||||
private:
|
private:
|
||||||
void processMouseTop(QWaylandInputDevice *inputDevice, const QPointF &local, Qt::MouseButtons b,Qt::KeyboardModifiers mods);
|
void processMouseTop(QWaylandInputDevice *inputDevice, const QPointF &local, Qt::MouseButtons b,Qt::KeyboardModifiers mods);
|
||||||
void processMouseBottom(QWaylandInputDevice *inputDevice, const QPointF &local, Qt::MouseButtons b,Qt::KeyboardModifiers mods);
|
void processMouseBottom(QWaylandInputDevice *inputDevice, const QPointF &local, Qt::MouseButtons b,Qt::KeyboardModifiers mods);
|
||||||
@ -372,7 +372,9 @@ bool QWaylandBradientDecoration::handleMouse(QWaylandInputDevice *inputDevice, c
|
|||||||
} else if (local.x() > window()->width() + margins().left()) {
|
} else if (local.x() > window()->width() + margins().left()) {
|
||||||
processMouseRight(inputDevice,local,b,mods);
|
processMouseRight(inputDevice,local,b,mods);
|
||||||
} else {
|
} else {
|
||||||
|
#if QT_CONFIG(cursor)
|
||||||
waylandWindow()->restoreMouseCursor(inputDevice);
|
waylandWindow()->restoreMouseCursor(inputDevice);
|
||||||
|
#endif
|
||||||
setMouseButtons(b);
|
setMouseButtons(b);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -409,19 +411,27 @@ void QWaylandBradientDecoration::processMouseTop(QWaylandInputDevice *inputDevic
|
|||||||
if (local.y() <= margins().bottom()) {
|
if (local.y() <= margins().bottom()) {
|
||||||
if (local.x() <= margins().left()) {
|
if (local.x() <= margins().left()) {
|
||||||
//top left bit
|
//top left bit
|
||||||
|
#if QT_CONFIG(cursor)
|
||||||
waylandWindow()->setMouseCursor(inputDevice, Qt::SizeFDiagCursor);
|
waylandWindow()->setMouseCursor(inputDevice, Qt::SizeFDiagCursor);
|
||||||
|
#endif
|
||||||
startResize(inputDevice,WL_SHELL_SURFACE_RESIZE_TOP_LEFT,b);
|
startResize(inputDevice,WL_SHELL_SURFACE_RESIZE_TOP_LEFT,b);
|
||||||
} else if (local.x() > window()->width() + margins().left()) {
|
} else if (local.x() > window()->width() + margins().left()) {
|
||||||
//top right bit
|
//top right bit
|
||||||
|
#if QT_CONFIG(cursor)
|
||||||
waylandWindow()->setMouseCursor(inputDevice, Qt::SizeBDiagCursor);
|
waylandWindow()->setMouseCursor(inputDevice, Qt::SizeBDiagCursor);
|
||||||
|
#endif
|
||||||
startResize(inputDevice,WL_SHELL_SURFACE_RESIZE_TOP_RIGHT,b);
|
startResize(inputDevice,WL_SHELL_SURFACE_RESIZE_TOP_RIGHT,b);
|
||||||
} else {
|
} else {
|
||||||
//top reszie bit
|
//top reszie bit
|
||||||
|
#if QT_CONFIG(cursor)
|
||||||
waylandWindow()->setMouseCursor(inputDevice, Qt::SplitVCursor);
|
waylandWindow()->setMouseCursor(inputDevice, Qt::SplitVCursor);
|
||||||
|
#endif
|
||||||
startResize(inputDevice,WL_SHELL_SURFACE_RESIZE_TOP,b);
|
startResize(inputDevice,WL_SHELL_SURFACE_RESIZE_TOP,b);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
#if QT_CONFIG(cursor)
|
||||||
waylandWindow()->restoreMouseCursor(inputDevice);
|
waylandWindow()->restoreMouseCursor(inputDevice);
|
||||||
|
#endif
|
||||||
startMove(inputDevice,b);
|
startMove(inputDevice,b);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -432,15 +442,21 @@ void QWaylandBradientDecoration::processMouseBottom(QWaylandInputDevice *inputDe
|
|||||||
Q_UNUSED(mods);
|
Q_UNUSED(mods);
|
||||||
if (local.x() <= margins().left()) {
|
if (local.x() <= margins().left()) {
|
||||||
//bottom left bit
|
//bottom left bit
|
||||||
|
#if QT_CONFIG(cursor)
|
||||||
waylandWindow()->setMouseCursor(inputDevice, Qt::SizeBDiagCursor);
|
waylandWindow()->setMouseCursor(inputDevice, Qt::SizeBDiagCursor);
|
||||||
|
#endif
|
||||||
startResize(inputDevice, WL_SHELL_SURFACE_RESIZE_BOTTOM_LEFT,b);
|
startResize(inputDevice, WL_SHELL_SURFACE_RESIZE_BOTTOM_LEFT,b);
|
||||||
} else if (local.x() > window()->width() + margins().left()) {
|
} else if (local.x() > window()->width() + margins().left()) {
|
||||||
//bottom right bit
|
//bottom right bit
|
||||||
|
#if QT_CONFIG(cursor)
|
||||||
waylandWindow()->setMouseCursor(inputDevice, Qt::SizeFDiagCursor);
|
waylandWindow()->setMouseCursor(inputDevice, Qt::SizeFDiagCursor);
|
||||||
|
#endif
|
||||||
startResize(inputDevice, WL_SHELL_SURFACE_RESIZE_BOTTOM_RIGHT,b);
|
startResize(inputDevice, WL_SHELL_SURFACE_RESIZE_BOTTOM_RIGHT,b);
|
||||||
} else {
|
} else {
|
||||||
//bottom bit
|
//bottom bit
|
||||||
|
#if QT_CONFIG(cursor)
|
||||||
waylandWindow()->setMouseCursor(inputDevice, Qt::SplitVCursor);
|
waylandWindow()->setMouseCursor(inputDevice, Qt::SplitVCursor);
|
||||||
|
#endif
|
||||||
startResize(inputDevice,WL_SHELL_SURFACE_RESIZE_BOTTOM,b);
|
startResize(inputDevice,WL_SHELL_SURFACE_RESIZE_BOTTOM,b);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -449,7 +465,9 @@ void QWaylandBradientDecoration::processMouseLeft(QWaylandInputDevice *inputDevi
|
|||||||
{
|
{
|
||||||
Q_UNUSED(local);
|
Q_UNUSED(local);
|
||||||
Q_UNUSED(mods);
|
Q_UNUSED(mods);
|
||||||
|
#if QT_CONFIG(cursor)
|
||||||
waylandWindow()->setMouseCursor(inputDevice, Qt::SplitHCursor);
|
waylandWindow()->setMouseCursor(inputDevice, Qt::SplitHCursor);
|
||||||
|
#endif
|
||||||
startResize(inputDevice,WL_SHELL_SURFACE_RESIZE_LEFT,b);
|
startResize(inputDevice,WL_SHELL_SURFACE_RESIZE_LEFT,b);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -457,7 +475,9 @@ void QWaylandBradientDecoration::processMouseRight(QWaylandInputDevice *inputDev
|
|||||||
{
|
{
|
||||||
Q_UNUSED(local);
|
Q_UNUSED(local);
|
||||||
Q_UNUSED(mods);
|
Q_UNUSED(mods);
|
||||||
|
#if QT_CONFIG(cursor)
|
||||||
waylandWindow()->setMouseCursor(inputDevice, Qt::SplitHCursor);
|
waylandWindow()->setMouseCursor(inputDevice, Qt::SplitHCursor);
|
||||||
|
#endif
|
||||||
startResize(inputDevice, WL_SHELL_SURFACE_RESIZE_RIGHT,b);
|
startResize(inputDevice, WL_SHELL_SURFACE_RESIZE_RIGHT,b);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -466,7 +486,7 @@ class QWaylandBradientDecorationPlugin : public QWaylandDecorationPlugin
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PLUGIN_METADATA(IID QWaylandDecorationFactoryInterface_iid FILE "bradient.json")
|
Q_PLUGIN_METADATA(IID QWaylandDecorationFactoryInterface_iid FILE "bradient.json")
|
||||||
public:
|
public:
|
||||||
QWaylandAbstractDecoration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
|
QWaylandAbstractDecoration *create(const QString&, const QStringList&) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
QWaylandAbstractDecoration *QWaylandBradientDecorationPlugin::create(const QString& system, const QStringList& paramList)
|
QWaylandAbstractDecoration *QWaylandBradientDecorationPlugin::create(const QString& system, const QStringList& paramList)
|
||||||
|
@ -8,4 +8,5 @@ OTHER_FILES += \
|
|||||||
SOURCES += main.cpp
|
SOURCES += main.cpp
|
||||||
|
|
||||||
PLUGIN_TYPE = wayland-graphics-integration-client
|
PLUGIN_TYPE = wayland-graphics-integration-client
|
||||||
|
PLUGIN_CLASS_NAME = QWaylandBrcmEglClientBufferPlugin
|
||||||
load(qt_plugin)
|
load(qt_plugin)
|
||||||
|
@ -49,7 +49,7 @@ class QWaylandBrcmEglClientBufferPlugin : public QWaylandClientBufferIntegration
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PLUGIN_METADATA(IID QWaylandClientBufferIntegrationFactoryInterface_iid FILE "brcm-egl.json")
|
Q_PLUGIN_METADATA(IID QWaylandClientBufferIntegrationFactoryInterface_iid FILE "brcm-egl.json")
|
||||||
public:
|
public:
|
||||||
QWaylandClientBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
|
QWaylandClientBufferIntegration *create(const QString&, const QStringList&) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
QWaylandClientBufferIntegration *QWaylandBrcmEglClientBufferPlugin::create(const QString& system, const QStringList& paramList)
|
QWaylandClientBufferIntegration *QWaylandBrcmEglClientBufferPlugin::create(const QString& system, const QStringList& paramList)
|
||||||
|
@ -11,4 +11,5 @@ OTHER_FILES += \
|
|||||||
SOURCES += main.cpp
|
SOURCES += main.cpp
|
||||||
|
|
||||||
PLUGIN_TYPE = wayland-graphics-integration-client
|
PLUGIN_TYPE = wayland-graphics-integration-client
|
||||||
|
PLUGIN_CLASS_NAME = DrmEglServerBufferPlugin
|
||||||
load(qt_plugin)
|
load(qt_plugin)
|
||||||
|
@ -49,7 +49,7 @@ class DrmEglServerBufferPlugin : public QWaylandServerBufferIntegrationPlugin
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PLUGIN_METADATA(IID QWaylandServerBufferIntegrationFactoryInterface_iid FILE "drm-egl-server.json")
|
Q_PLUGIN_METADATA(IID QWaylandServerBufferIntegrationFactoryInterface_iid FILE "drm-egl-server.json")
|
||||||
public:
|
public:
|
||||||
QWaylandServerBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
|
QWaylandServerBufferIntegration *create(const QString&, const QStringList&) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
QWaylandServerBufferIntegration *DrmEglServerBufferPlugin::create(const QString& system, const QStringList& paramList)
|
QWaylandServerBufferIntegration *DrmEglServerBufferPlugin::create(const QString& system, const QStringList& paramList)
|
||||||
|
@ -8,4 +8,5 @@ OTHER_FILES += \
|
|||||||
SOURCES += main.cpp
|
SOURCES += main.cpp
|
||||||
|
|
||||||
PLUGIN_TYPE = wayland-graphics-integration-client
|
PLUGIN_TYPE = wayland-graphics-integration-client
|
||||||
|
PLUGIN_CLASS_NAME = LibHybrisEglServerBufferPlugin
|
||||||
load(qt_plugin)
|
load(qt_plugin)
|
||||||
|
@ -49,7 +49,7 @@ class LibHybrisEglServerBufferPlugin : public QWaylandServerBufferIntegrationPlu
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PLUGIN_METADATA(IID QWaylandServerBufferIntegrationFactoryInterface_iid FILE "libhybris-egl-server.json")
|
Q_PLUGIN_METADATA(IID QWaylandServerBufferIntegrationFactoryInterface_iid FILE "libhybris-egl-server.json")
|
||||||
public:
|
public:
|
||||||
QWaylandServerBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
|
QWaylandServerBufferIntegration *create(const QString&, const QStringList&) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
QWaylandServerBufferIntegration *LibHybrisEglServerBufferPlugin::create(const QString& system, const QStringList& paramList)
|
QWaylandServerBufferIntegration *LibHybrisEglServerBufferPlugin::create(const QString& system, const QStringList& paramList)
|
||||||
|
@ -49,7 +49,7 @@ class QWaylandEglClientBufferPlugin : public QWaylandClientBufferIntegrationPlug
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PLUGIN_METADATA(IID QWaylandClientBufferIntegrationFactoryInterface_iid FILE "wayland-egl.json")
|
Q_PLUGIN_METADATA(IID QWaylandClientBufferIntegrationFactoryInterface_iid FILE "wayland-egl.json")
|
||||||
public:
|
public:
|
||||||
QWaylandClientBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
|
QWaylandClientBufferIntegration *create(const QString&, const QStringList&) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
QWaylandClientBufferIntegration *QWaylandEglClientBufferPlugin::create(const QString& system, const QStringList& paramList)
|
QWaylandClientBufferIntegration *QWaylandEglClientBufferPlugin::create(const QString& system, const QStringList& paramList)
|
||||||
|
@ -8,4 +8,5 @@ OTHER_FILES += \
|
|||||||
SOURCES += main.cpp
|
SOURCES += main.cpp
|
||||||
|
|
||||||
PLUGIN_TYPE = wayland-graphics-integration-client
|
PLUGIN_TYPE = wayland-graphics-integration-client
|
||||||
|
PLUGIN_CLASS_NAME = QWaylandEglClientBufferPlugin
|
||||||
load(qt_plugin)
|
load(qt_plugin)
|
||||||
|
@ -49,7 +49,7 @@ class QWaylandXCompositeEglClientBufferIntegrationPlugin : public QWaylandClient
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PLUGIN_METADATA(IID QWaylandClientBufferIntegrationFactoryInterface_iid FILE "xcomposite-egl.json")
|
Q_PLUGIN_METADATA(IID QWaylandClientBufferIntegrationFactoryInterface_iid FILE "xcomposite-egl.json")
|
||||||
public:
|
public:
|
||||||
QWaylandClientBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
|
QWaylandClientBufferIntegration *create(const QString&, const QStringList&) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
QWaylandClientBufferIntegration *QWaylandXCompositeEglClientBufferIntegrationPlugin::create(const QString& system, const QStringList& paramList)
|
QWaylandClientBufferIntegration *QWaylandXCompositeEglClientBufferIntegrationPlugin::create(const QString& system, const QStringList& paramList)
|
||||||
|
@ -11,4 +11,5 @@ SOURCES += \
|
|||||||
main.cpp
|
main.cpp
|
||||||
|
|
||||||
PLUGIN_TYPE = wayland-graphics-integration-client
|
PLUGIN_TYPE = wayland-graphics-integration-client
|
||||||
|
PLUGIN_CLASS_NAME = QWaylandXCompositeEglClientBufferIntegrationPlugin
|
||||||
load(qt_plugin)
|
load(qt_plugin)
|
||||||
|
@ -49,7 +49,7 @@ class QWaylandXCompositeGlxClientBufferIntegrationPlugin : public QWaylandClient
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PLUGIN_METADATA(IID QWaylandClientBufferIntegrationFactoryInterface_iid FILE "xcomposite-glx.json")
|
Q_PLUGIN_METADATA(IID QWaylandClientBufferIntegrationFactoryInterface_iid FILE "xcomposite-glx.json")
|
||||||
public:
|
public:
|
||||||
QWaylandClientBufferIntegration *create(const QString&, const QStringList&) Q_DECL_OVERRIDE;
|
QWaylandClientBufferIntegration *create(const QString&, const QStringList&) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
QWaylandClientBufferIntegration *QWaylandXCompositeGlxClientBufferIntegrationPlugin::create(const QString& system, const QStringList& paramList)
|
QWaylandClientBufferIntegration *QWaylandXCompositeGlxClientBufferIntegrationPlugin::create(const QString& system, const QStringList& paramList)
|
||||||
|
@ -8,4 +8,5 @@ SOURCES += \
|
|||||||
main.cpp
|
main.cpp
|
||||||
|
|
||||||
PLUGIN_TYPE = wayland-graphics-integration-client
|
PLUGIN_TYPE = wayland-graphics-integration-client
|
||||||
|
PLUGIN_CLASS_NAME = QWaylandXCompositeGlxClientBufferIntegrationPlugin
|
||||||
load(qt_plugin)
|
load(qt_plugin)
|
||||||
|
@ -71,10 +71,10 @@ public:
|
|||||||
|
|
||||||
~QWaylandClipboard();
|
~QWaylandClipboard();
|
||||||
|
|
||||||
QMimeData *mimeData(QClipboard::Mode mode = QClipboard::Clipboard) Q_DECL_OVERRIDE;
|
QMimeData *mimeData(QClipboard::Mode mode = QClipboard::Clipboard) override;
|
||||||
void setMimeData(QMimeData *data, QClipboard::Mode mode = QClipboard::Clipboard) Q_DECL_OVERRIDE;
|
void setMimeData(QMimeData *data, QClipboard::Mode mode = QClipboard::Clipboard) override;
|
||||||
bool supportsMode(QClipboard::Mode mode) const Q_DECL_OVERRIDE;
|
bool supportsMode(QClipboard::Mode mode) const override;
|
||||||
bool ownsMode(QClipboard::Mode mode) const Q_DECL_OVERRIDE;
|
bool ownsMode(QClipboard::Mode mode) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QWaylandDisplay *mDisplay;
|
QWaylandDisplay *mDisplay;
|
||||||
|
@ -55,6 +55,8 @@
|
|||||||
#include <QtCore/QMap>
|
#include <QtCore/QMap>
|
||||||
#include <QtWaylandClient/qtwaylandclientglobal.h>
|
#include <QtWaylandClient/qtwaylandclientglobal.h>
|
||||||
|
|
||||||
|
#if QT_CONFIG(cursor)
|
||||||
|
|
||||||
struct wl_cursor;
|
struct wl_cursor;
|
||||||
struct wl_cursor_image;
|
struct wl_cursor_image;
|
||||||
struct wl_cursor_theme;
|
struct wl_cursor_theme;
|
||||||
@ -73,10 +75,10 @@ public:
|
|||||||
QWaylandCursor(QWaylandScreen *screen);
|
QWaylandCursor(QWaylandScreen *screen);
|
||||||
~QWaylandCursor();
|
~QWaylandCursor();
|
||||||
|
|
||||||
void changeCursor(QCursor *cursor, QWindow *window) Q_DECL_OVERRIDE;
|
void changeCursor(QCursor *cursor, QWindow *window) override;
|
||||||
void pointerEvent(const QMouseEvent &event) Q_DECL_OVERRIDE;
|
void pointerEvent(const QMouseEvent &event) override;
|
||||||
QPoint pos() const Q_DECL_OVERRIDE;
|
QPoint pos() const override;
|
||||||
void setPos(const QPoint &pos) Q_DECL_OVERRIDE;
|
void setPos(const QPoint &pos) override;
|
||||||
|
|
||||||
struct wl_cursor_image *cursorImage(Qt::CursorShape shape);
|
struct wl_cursor_image *cursorImage(Qt::CursorShape shape);
|
||||||
QSharedPointer<QWaylandBuffer> cursorBitmapImage(const QCursor *cursor);
|
QSharedPointer<QWaylandBuffer> cursorBitmapImage(const QCursor *cursor);
|
||||||
@ -128,4 +130,5 @@ private:
|
|||||||
|
|
||||||
QT_END_NAMESPACE
|
QT_END_NAMESPACE
|
||||||
|
|
||||||
|
#endif // cursor
|
||||||
#endif // QWAYLANDCURSOR_H
|
#endif // QWAYLANDCURSOR_H
|
||||||
|
@ -52,7 +52,9 @@
|
|||||||
#include <QtGui/QGuiApplication>
|
#include <QtGui/QGuiApplication>
|
||||||
#include <QtGui/private/qguiapplication_p.h>
|
#include <QtGui/private/qguiapplication_p.h>
|
||||||
|
|
||||||
|
#if QT_CONFIG(clipboard)
|
||||||
#include <qpa/qplatformclipboard.h>
|
#include <qpa/qplatformclipboard.h>
|
||||||
|
#endif
|
||||||
#include <qpa/qplatformdrag.h>
|
#include <qpa/qplatformdrag.h>
|
||||||
#include <qpa/qwindowsysteminterface.h>
|
#include <qpa/qwindowsysteminterface.h>
|
||||||
|
|
||||||
@ -235,13 +237,17 @@ void QWaylandDataDevice::data_device_selection(wl_data_offer *id)
|
|||||||
else
|
else
|
||||||
m_selectionOffer.reset();
|
m_selectionOffer.reset();
|
||||||
|
|
||||||
|
#if QT_CONFIG(clipboard)
|
||||||
QGuiApplicationPrivate::platformIntegration()->clipboard()->emitChanged(QClipboard::Clipboard);
|
QGuiApplicationPrivate::platformIntegration()->clipboard()->emitChanged(QClipboard::Clipboard);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void QWaylandDataDevice::selectionSourceCancelled()
|
void QWaylandDataDevice::selectionSourceCancelled()
|
||||||
{
|
{
|
||||||
m_selectionSource.reset();
|
m_selectionSource.reset();
|
||||||
|
#if QT_CONFIG(clipboard)
|
||||||
QGuiApplicationPrivate::platformIntegration()->clipboard()->emitChanged(QClipboard::Clipboard);
|
QGuiApplicationPrivate::platformIntegration()->clipboard()->emitChanged(QClipboard::Clipboard);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void QWaylandDataDevice::dragSourceCancelled()
|
void QWaylandDataDevice::dragSourceCancelled()
|
||||||
|
@ -92,12 +92,12 @@ public:
|
|||||||
void cancelDrag();
|
void cancelDrag();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void data_device_data_offer(struct ::wl_data_offer *id) Q_DECL_OVERRIDE;
|
void data_device_data_offer(struct ::wl_data_offer *id) override;
|
||||||
void data_device_drop() Q_DECL_OVERRIDE;
|
void data_device_drop() override;
|
||||||
void data_device_enter(uint32_t serial, struct ::wl_surface *surface, wl_fixed_t x, wl_fixed_t y, struct ::wl_data_offer *id) Q_DECL_OVERRIDE;
|
void data_device_enter(uint32_t serial, struct ::wl_surface *surface, wl_fixed_t x, wl_fixed_t y, struct ::wl_data_offer *id) override;
|
||||||
void data_device_leave() Q_DECL_OVERRIDE;
|
void data_device_leave() override;
|
||||||
void data_device_motion(uint32_t time, wl_fixed_t x, wl_fixed_t y) Q_DECL_OVERRIDE;
|
void data_device_motion(uint32_t time, wl_fixed_t x, wl_fixed_t y) override;
|
||||||
void data_device_selection(struct ::wl_data_offer *id) Q_DECL_OVERRIDE;
|
void data_device_selection(struct ::wl_data_offer *id) override;
|
||||||
|
|
||||||
private Q_SLOTS:
|
private Q_SLOTS:
|
||||||
void selectionSourceCancelled();
|
void selectionSourceCancelled();
|
||||||
|
@ -75,7 +75,7 @@ public:
|
|||||||
QMimeData *mimeData();
|
QMimeData *mimeData();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void data_offer_offer(const QString &mime_type) Q_DECL_OVERRIDE;
|
void data_offer_offer(const QString &mime_type) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QScopedPointer<QWaylandMimeData> m_mimeData;
|
QScopedPointer<QWaylandMimeData> m_mimeData;
|
||||||
@ -90,9 +90,9 @@ public:
|
|||||||
void appendFormat(const QString &mimeType);
|
void appendFormat(const QString &mimeType);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool hasFormat_sys(const QString &mimeType) const Q_DECL_OVERRIDE;
|
bool hasFormat_sys(const QString &mimeType) const override;
|
||||||
QStringList formats_sys() const Q_DECL_OVERRIDE;
|
QStringList formats_sys() const override;
|
||||||
QVariant retrieveData_sys(const QString &mimeType, QVariant::Type type) const Q_DECL_OVERRIDE;
|
QVariant retrieveData_sys(const QString &mimeType, QVariant::Type type) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int readData(int fd, QByteArray &data) const;
|
int readData(int fd, QByteArray &data) const;
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
#include <QtCore/QDebug>
|
#include <QtCore/QDebug>
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <signal.h>
|
||||||
|
|
||||||
#if QT_CONFIG(draganddrop)
|
#if QT_CONFIG(draganddrop)
|
||||||
|
|
||||||
@ -85,7 +86,16 @@ void QWaylandDataSource::data_source_send(const QString &mime_type, int32_t fd)
|
|||||||
{
|
{
|
||||||
QByteArray content = QWaylandMimeHelper::getByteArray(m_mime_data, mime_type);
|
QByteArray content = QWaylandMimeHelper::getByteArray(m_mime_data, mime_type);
|
||||||
if (!content.isEmpty()) {
|
if (!content.isEmpty()) {
|
||||||
|
// Create a sigpipe handler that does nothing, or clients may be forced to terminate
|
||||||
|
// if the pipe is closed in the other end.
|
||||||
|
struct sigaction action, oldAction;
|
||||||
|
action.sa_handler = SIG_IGN;
|
||||||
|
sigemptyset (&action.sa_mask);
|
||||||
|
action.sa_flags = 0;
|
||||||
|
|
||||||
|
sigaction(SIGPIPE, &action, &oldAction);
|
||||||
write(fd, content.constData(), content.size());
|
write(fd, content.constData(), content.size());
|
||||||
|
sigaction(SIGPIPE, &oldAction, nullptr);
|
||||||
}
|
}
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
|
@ -81,9 +81,9 @@ Q_SIGNALS:
|
|||||||
void cancelled();
|
void cancelled();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void data_source_cancelled() Q_DECL_OVERRIDE;
|
void data_source_cancelled() override;
|
||||||
void data_source_send(const QString &mime_type, int32_t fd) Q_DECL_OVERRIDE;
|
void data_source_send(const QString &mime_type, int32_t fd) override;
|
||||||
void data_source_target(const QString &mime_type) Q_DECL_OVERRIDE;
|
void data_source_target(const QString &mime_type) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QWaylandDisplay *m_display;
|
QWaylandDisplay *m_display;
|
||||||
|
@ -44,7 +44,9 @@
|
|||||||
#include "qwaylandscreen_p.h"
|
#include "qwaylandscreen_p.h"
|
||||||
#include "qwaylandcursor_p.h"
|
#include "qwaylandcursor_p.h"
|
||||||
#include "qwaylandinputdevice_p.h"
|
#include "qwaylandinputdevice_p.h"
|
||||||
|
#if QT_CONFIG(clipboard)
|
||||||
#include "qwaylandclipboard_p.h"
|
#include "qwaylandclipboard_p.h"
|
||||||
|
#endif
|
||||||
#include "qwaylanddatadevicemanager_p.h"
|
#include "qwaylanddatadevicemanager_p.h"
|
||||||
#include "qwaylandhardwareintegration_p.h"
|
#include "qwaylandhardwareintegration_p.h"
|
||||||
#include "qwaylandxdgshell_p.h"
|
#include "qwaylandxdgshell_p.h"
|
||||||
|
@ -225,8 +225,8 @@ private:
|
|||||||
struct wl_callback *mSyncCallback;
|
struct wl_callback *mSyncCallback;
|
||||||
static const wl_callback_listener syncCallbackListener;
|
static const wl_callback_listener syncCallbackListener;
|
||||||
|
|
||||||
void registry_global(uint32_t id, const QString &interface, uint32_t version) Q_DECL_OVERRIDE;
|
void registry_global(uint32_t id, const QString &interface, uint32_t version) override;
|
||||||
void registry_global_remove(uint32_t id) Q_DECL_OVERRIDE;
|
void registry_global_remove(uint32_t id) override;
|
||||||
|
|
||||||
static void shellHandleConfigure(void *data, struct wl_shell *shell,
|
static void shellHandleConfigure(void *data, struct wl_shell *shell,
|
||||||
uint32_t time, uint32_t edges,
|
uint32_t time, uint32_t edges,
|
||||||
|
@ -71,18 +71,18 @@ public:
|
|||||||
QWaylandDrag(QWaylandDisplay *display);
|
QWaylandDrag(QWaylandDisplay *display);
|
||||||
~QWaylandDrag();
|
~QWaylandDrag();
|
||||||
|
|
||||||
QMimeData *platformDropData() Q_DECL_OVERRIDE;
|
QMimeData *platformDropData() override;
|
||||||
|
|
||||||
void updateTarget(const QString &mimeType);
|
void updateTarget(const QString &mimeType);
|
||||||
void setResponse(const QPlatformDragQtResponse &response);
|
void setResponse(const QPlatformDragQtResponse &response);
|
||||||
void finishDrag(const QPlatformDropQtResponse &response);
|
void finishDrag(const QPlatformDropQtResponse &response);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void startDrag() Q_DECL_OVERRIDE;
|
void startDrag() override;
|
||||||
void cancel() Q_DECL_OVERRIDE;
|
void cancel() override;
|
||||||
void move(const QPoint &globalPos) Q_DECL_OVERRIDE;
|
void move(const QPoint &globalPos) override;
|
||||||
void drop(const QPoint &globalPos) Q_DECL_OVERRIDE;
|
void drop(const QPoint &globalPos) override;
|
||||||
void endDrag() Q_DECL_OVERRIDE;
|
void endDrag() override;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -79,9 +79,9 @@ public:
|
|||||||
Qt::WindowFlags setWindowFlags(Qt::WindowFlags flags);
|
Qt::WindowFlags setWindowFlags(Qt::WindowFlags flags);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void extended_surface_onscreen_visibility(int32_t visibility) Q_DECL_OVERRIDE;
|
void extended_surface_onscreen_visibility(int32_t visibility) override;
|
||||||
void extended_surface_set_generic_property(const QString &name, wl_array *value) Q_DECL_OVERRIDE;
|
void extended_surface_set_generic_property(const QString &name, wl_array *value) override;
|
||||||
void extended_surface_close() Q_DECL_OVERRIDE;
|
void extended_surface_close() override;
|
||||||
|
|
||||||
QWaylandWindow *m_window;
|
QWaylandWindow *m_window;
|
||||||
QVariantMap m_properties;
|
QVariantMap m_properties;
|
||||||
|
@ -89,20 +89,20 @@ public:
|
|||||||
Qt::LayoutDirection inputDirection() const;
|
Qt::LayoutDirection inputDirection() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void zwp_text_input_v2_enter(uint32_t serial, struct ::wl_surface *surface) Q_DECL_OVERRIDE;
|
void zwp_text_input_v2_enter(uint32_t serial, struct ::wl_surface *surface) override;
|
||||||
void zwp_text_input_v2_leave(uint32_t serial, struct ::wl_surface *surface) Q_DECL_OVERRIDE;
|
void zwp_text_input_v2_leave(uint32_t serial, struct ::wl_surface *surface) override;
|
||||||
void zwp_text_input_v2_modifiers_map(wl_array *map) Q_DECL_OVERRIDE;
|
void zwp_text_input_v2_modifiers_map(wl_array *map) override;
|
||||||
void zwp_text_input_v2_input_panel_state(uint32_t state, int32_t x, int32_t y, int32_t width, int32_t height) Q_DECL_OVERRIDE;
|
void zwp_text_input_v2_input_panel_state(uint32_t state, int32_t x, int32_t y, int32_t width, int32_t height) override;
|
||||||
void zwp_text_input_v2_preedit_string(const QString &text, const QString &commit) Q_DECL_OVERRIDE;
|
void zwp_text_input_v2_preedit_string(const QString &text, const QString &commit) override;
|
||||||
void zwp_text_input_v2_preedit_styling(uint32_t index, uint32_t length, uint32_t style) Q_DECL_OVERRIDE;
|
void zwp_text_input_v2_preedit_styling(uint32_t index, uint32_t length, uint32_t style) override;
|
||||||
void zwp_text_input_v2_preedit_cursor(int32_t index) Q_DECL_OVERRIDE;
|
void zwp_text_input_v2_preedit_cursor(int32_t index) override;
|
||||||
void zwp_text_input_v2_commit_string(const QString &text) Q_DECL_OVERRIDE;
|
void zwp_text_input_v2_commit_string(const QString &text) override;
|
||||||
void zwp_text_input_v2_cursor_position(int32_t index, int32_t anchor) Q_DECL_OVERRIDE;
|
void zwp_text_input_v2_cursor_position(int32_t index, int32_t anchor) override;
|
||||||
void zwp_text_input_v2_delete_surrounding_text(uint32_t before_length, uint32_t after_length) Q_DECL_OVERRIDE;
|
void zwp_text_input_v2_delete_surrounding_text(uint32_t before_length, uint32_t after_length) override;
|
||||||
void zwp_text_input_v2_keysym(uint32_t time, uint32_t sym, uint32_t state, uint32_t modifiers) Q_DECL_OVERRIDE;
|
void zwp_text_input_v2_keysym(uint32_t time, uint32_t sym, uint32_t state, uint32_t modifiers) override;
|
||||||
void zwp_text_input_v2_language(const QString &language) Q_DECL_OVERRIDE;
|
void zwp_text_input_v2_language(const QString &language) override;
|
||||||
void zwp_text_input_v2_text_direction(uint32_t direction) Q_DECL_OVERRIDE;
|
void zwp_text_input_v2_text_direction(uint32_t direction) override;
|
||||||
void zwp_text_input_v2_input_method_changed(uint32_t serial, uint32_t flags) Q_DECL_OVERRIDE;
|
void zwp_text_input_v2_input_method_changed(uint32_t serial, uint32_t flags) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Qt::KeyboardModifiers modifiersToQtModifiers(uint32_t modifiers);
|
Qt::KeyboardModifiers modifiersToQtModifiers(uint32_t modifiers);
|
||||||
@ -134,23 +134,23 @@ public:
|
|||||||
explicit QWaylandInputContext(QWaylandDisplay *display);
|
explicit QWaylandInputContext(QWaylandDisplay *display);
|
||||||
~QWaylandInputContext();
|
~QWaylandInputContext();
|
||||||
|
|
||||||
bool isValid() const Q_DECL_OVERRIDE;
|
bool isValid() const override;
|
||||||
|
|
||||||
void reset() Q_DECL_OVERRIDE;
|
void reset() override;
|
||||||
void commit() Q_DECL_OVERRIDE;
|
void commit() override;
|
||||||
void update(Qt::InputMethodQueries) Q_DECL_OVERRIDE;
|
void update(Qt::InputMethodQueries) override;
|
||||||
|
|
||||||
void invokeAction(QInputMethod::Action, int cursorPosition) Q_DECL_OVERRIDE;
|
void invokeAction(QInputMethod::Action, int cursorPosition) override;
|
||||||
|
|
||||||
void showInputPanel() Q_DECL_OVERRIDE;
|
void showInputPanel() override;
|
||||||
void hideInputPanel() Q_DECL_OVERRIDE;
|
void hideInputPanel() override;
|
||||||
bool isInputPanelVisible() const Q_DECL_OVERRIDE;
|
bool isInputPanelVisible() const override;
|
||||||
QRectF keyboardRect() const Q_DECL_OVERRIDE;
|
QRectF keyboardRect() const override;
|
||||||
|
|
||||||
QLocale locale() const Q_DECL_OVERRIDE;
|
QLocale locale() const override;
|
||||||
Qt::LayoutDirection inputDirection() const Q_DECL_OVERRIDE;
|
Qt::LayoutDirection inputDirection() const override;
|
||||||
|
|
||||||
void setFocusObject(QObject *object) Q_DECL_OVERRIDE;
|
void setFocusObject(QObject *object) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QWaylandTextInput *textInput() const;
|
QWaylandTextInput *textInput() const;
|
||||||
|
@ -62,7 +62,9 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
|
||||||
|
#if QT_CONFIG(cursor)
|
||||||
#include <wayland-cursor.h>
|
#include <wayland-cursor.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <QtGui/QGuiApplication>
|
#include <QtGui/QGuiApplication>
|
||||||
|
|
||||||
@ -145,10 +147,14 @@ QWaylandInputDevice::Pointer::Pointer(QWaylandInputDevice *p)
|
|||||||
: mParent(p)
|
: mParent(p)
|
||||||
, mFocus(0)
|
, mFocus(0)
|
||||||
, mEnterSerial(0)
|
, mEnterSerial(0)
|
||||||
|
#if QT_CONFIG(cursor)
|
||||||
, mCursorSerial(0)
|
, mCursorSerial(0)
|
||||||
|
#endif
|
||||||
, mButtons(0)
|
, mButtons(0)
|
||||||
|
#if QT_CONFIG(cursor)
|
||||||
, mCursorBuffer(nullptr)
|
, mCursorBuffer(nullptr)
|
||||||
, mCursorShape(Qt::BitmapCursor)
|
, mCursorShape(Qt::BitmapCursor)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -344,6 +350,7 @@ Qt::KeyboardModifiers QWaylandInputDevice::Keyboard::modifiers() const
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if QT_CONFIG(cursor)
|
||||||
uint32_t QWaylandInputDevice::cursorSerial() const
|
uint32_t QWaylandInputDevice::cursorSerial() const
|
||||||
{
|
{
|
||||||
if (mPointer)
|
if (mPointer)
|
||||||
@ -415,6 +422,7 @@ void QWaylandInputDevice::setCursor(const QSharedPointer<QWaylandBuffer> &buffer
|
|||||||
setCursor(buffer->buffer(), hotSpot, buffer->size());
|
setCursor(buffer->buffer(), hotSpot, buffer->size());
|
||||||
mPixmapCursor = buffer;
|
mPixmapCursor = buffer;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
class EnterEvent : public QWaylandPointerEvent
|
class EnterEvent : public QWaylandPointerEvent
|
||||||
{
|
{
|
||||||
@ -431,7 +439,9 @@ void QWaylandInputDevice::Pointer::pointer_enter(uint32_t serial, struct wl_surf
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
QWaylandWindow *window = QWaylandWindow::fromWlSurface(surface);
|
QWaylandWindow *window = QWaylandWindow::fromWlSurface(surface);
|
||||||
|
#if QT_CONFIG(cursor)
|
||||||
window->window()->setCursor(window->window()->cursor());
|
window->window()->setCursor(window->window()->cursor());
|
||||||
|
#endif
|
||||||
|
|
||||||
mFocus = window;
|
mFocus = window;
|
||||||
mSurfacePos = QPointF(wl_fixed_to_double(sx), wl_fixed_to_double(sy));
|
mSurfacePos = QPointF(wl_fixed_to_double(sx), wl_fixed_to_double(sy));
|
||||||
|
@ -72,7 +72,9 @@
|
|||||||
|
|
||||||
#include <QtCore/QDebug>
|
#include <QtCore/QDebug>
|
||||||
|
|
||||||
|
#if QT_CONFIG(cursor)
|
||||||
struct wl_cursor_image;
|
struct wl_cursor_image;
|
||||||
|
#endif
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@ -100,10 +102,12 @@ public:
|
|||||||
|
|
||||||
struct ::wl_seat *wl_seat() { return QtWayland::wl_seat::object(); }
|
struct ::wl_seat *wl_seat() { return QtWayland::wl_seat::object(); }
|
||||||
|
|
||||||
|
#if QT_CONFIG(cursor)
|
||||||
void setCursor(const QCursor &cursor, QWaylandScreen *screen);
|
void setCursor(const QCursor &cursor, QWaylandScreen *screen);
|
||||||
void setCursor(struct wl_buffer *buffer, struct ::wl_cursor_image *image);
|
void setCursor(struct wl_buffer *buffer, struct ::wl_cursor_image *image);
|
||||||
void setCursor(struct wl_buffer *buffer, const QPoint &hotSpot, const QSize &size);
|
void setCursor(struct wl_buffer *buffer, const QPoint &hotSpot, const QSize &size);
|
||||||
void setCursor(const QSharedPointer<QWaylandBuffer> &buffer, const QPoint &hotSpot);
|
void setCursor(const QSharedPointer<QWaylandBuffer> &buffer, const QPoint &hotSpot);
|
||||||
|
#endif
|
||||||
void handleWindowDestroyed(QWaylandWindow *window);
|
void handleWindowDestroyed(QWaylandWindow *window);
|
||||||
void handleEndDrag();
|
void handleEndDrag();
|
||||||
|
|
||||||
@ -150,7 +154,7 @@ private:
|
|||||||
uint32_t mTime;
|
uint32_t mTime;
|
||||||
uint32_t mSerial;
|
uint32_t mSerial;
|
||||||
|
|
||||||
void seat_capabilities(uint32_t caps) Q_DECL_OVERRIDE;
|
void seat_capabilities(uint32_t caps) override;
|
||||||
void handleTouchPoint(int id, double x, double y, Qt::TouchPointState state);
|
void handleTouchPoint(int id, double x, double y, Qt::TouchPointState state);
|
||||||
|
|
||||||
QTouchDevice *mTouchDevice;
|
QTouchDevice *mTouchDevice;
|
||||||
@ -179,19 +183,19 @@ public:
|
|||||||
|
|
||||||
void keyboard_keymap(uint32_t format,
|
void keyboard_keymap(uint32_t format,
|
||||||
int32_t fd,
|
int32_t fd,
|
||||||
uint32_t size) Q_DECL_OVERRIDE;
|
uint32_t size) override;
|
||||||
void keyboard_enter(uint32_t time,
|
void keyboard_enter(uint32_t time,
|
||||||
struct wl_surface *surface,
|
struct wl_surface *surface,
|
||||||
struct wl_array *keys) Q_DECL_OVERRIDE;
|
struct wl_array *keys) override;
|
||||||
void keyboard_leave(uint32_t time,
|
void keyboard_leave(uint32_t time,
|
||||||
struct wl_surface *surface) Q_DECL_OVERRIDE;
|
struct wl_surface *surface) override;
|
||||||
void keyboard_key(uint32_t serial, uint32_t time,
|
void keyboard_key(uint32_t serial, uint32_t time,
|
||||||
uint32_t key, uint32_t state) Q_DECL_OVERRIDE;
|
uint32_t key, uint32_t state) override;
|
||||||
void keyboard_modifiers(uint32_t serial,
|
void keyboard_modifiers(uint32_t serial,
|
||||||
uint32_t mods_depressed,
|
uint32_t mods_depressed,
|
||||||
uint32_t mods_latched,
|
uint32_t mods_latched,
|
||||||
uint32_t mods_locked,
|
uint32_t mods_locked,
|
||||||
uint32_t group) Q_DECL_OVERRIDE;
|
uint32_t group) override;
|
||||||
|
|
||||||
QWaylandInputDevice *mParent;
|
QWaylandInputDevice *mParent;
|
||||||
QWaylandWindow *mFocus;
|
QWaylandWindow *mFocus;
|
||||||
@ -232,27 +236,31 @@ public:
|
|||||||
virtual ~Pointer();
|
virtual ~Pointer();
|
||||||
|
|
||||||
void pointer_enter(uint32_t serial, struct wl_surface *surface,
|
void pointer_enter(uint32_t serial, struct wl_surface *surface,
|
||||||
wl_fixed_t sx, wl_fixed_t sy) Q_DECL_OVERRIDE;
|
wl_fixed_t sx, wl_fixed_t sy) override;
|
||||||
void pointer_leave(uint32_t time, struct wl_surface *surface) Q_DECL_OVERRIDE;
|
void pointer_leave(uint32_t time, struct wl_surface *surface) override;
|
||||||
void pointer_motion(uint32_t time,
|
void pointer_motion(uint32_t time,
|
||||||
wl_fixed_t sx, wl_fixed_t sy) Q_DECL_OVERRIDE;
|
wl_fixed_t sx, wl_fixed_t sy) override;
|
||||||
void pointer_button(uint32_t serial, uint32_t time,
|
void pointer_button(uint32_t serial, uint32_t time,
|
||||||
uint32_t button, uint32_t state) Q_DECL_OVERRIDE;
|
uint32_t button, uint32_t state) override;
|
||||||
void pointer_axis(uint32_t time,
|
void pointer_axis(uint32_t time,
|
||||||
uint32_t axis,
|
uint32_t axis,
|
||||||
wl_fixed_t value) Q_DECL_OVERRIDE;
|
wl_fixed_t value) override;
|
||||||
|
|
||||||
void releaseButtons();
|
void releaseButtons();
|
||||||
|
|
||||||
QWaylandInputDevice *mParent;
|
QWaylandInputDevice *mParent;
|
||||||
QWaylandWindow *mFocus;
|
QWaylandWindow *mFocus;
|
||||||
uint32_t mEnterSerial;
|
uint32_t mEnterSerial;
|
||||||
|
#if QT_CONFIG(cursor)
|
||||||
uint32_t mCursorSerial;
|
uint32_t mCursorSerial;
|
||||||
|
#endif
|
||||||
QPointF mSurfacePos;
|
QPointF mSurfacePos;
|
||||||
QPointF mGlobalPos;
|
QPointF mGlobalPos;
|
||||||
Qt::MouseButtons mButtons;
|
Qt::MouseButtons mButtons;
|
||||||
|
#if QT_CONFIG(cursor)
|
||||||
wl_buffer *mCursorBuffer;
|
wl_buffer *mCursorBuffer;
|
||||||
Qt::CursorShape mCursorShape;
|
Qt::CursorShape mCursorShape;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
class Q_WAYLAND_CLIENT_EXPORT QWaylandInputDevice::Touch : public QtWayland::wl_touch
|
class Q_WAYLAND_CLIENT_EXPORT QWaylandInputDevice::Touch : public QtWayland::wl_touch
|
||||||
@ -266,16 +274,16 @@ public:
|
|||||||
struct wl_surface *surface,
|
struct wl_surface *surface,
|
||||||
int32_t id,
|
int32_t id,
|
||||||
wl_fixed_t x,
|
wl_fixed_t x,
|
||||||
wl_fixed_t y) Q_DECL_OVERRIDE;
|
wl_fixed_t y) override;
|
||||||
void touch_up(uint32_t serial,
|
void touch_up(uint32_t serial,
|
||||||
uint32_t time,
|
uint32_t time,
|
||||||
int32_t id) Q_DECL_OVERRIDE;
|
int32_t id) override;
|
||||||
void touch_motion(uint32_t time,
|
void touch_motion(uint32_t time,
|
||||||
int32_t id,
|
int32_t id,
|
||||||
wl_fixed_t x,
|
wl_fixed_t x,
|
||||||
wl_fixed_t y) Q_DECL_OVERRIDE;
|
wl_fixed_t y) override;
|
||||||
void touch_frame() Q_DECL_OVERRIDE;
|
void touch_frame() override;
|
||||||
void touch_cancel() Q_DECL_OVERRIDE;
|
void touch_cancel() override;
|
||||||
|
|
||||||
bool allTouchPointsReleased();
|
bool allTouchPointsReleased();
|
||||||
void releasePoints();
|
void releasePoints();
|
||||||
|
@ -45,7 +45,9 @@
|
|||||||
#include "qwaylandinputcontext_p.h"
|
#include "qwaylandinputcontext_p.h"
|
||||||
#include "qwaylandshmbackingstore_p.h"
|
#include "qwaylandshmbackingstore_p.h"
|
||||||
#include "qwaylandnativeinterface_p.h"
|
#include "qwaylandnativeinterface_p.h"
|
||||||
|
#if QT_CONFIG(clipboard)
|
||||||
#include "qwaylandclipboard_p.h"
|
#include "qwaylandclipboard_p.h"
|
||||||
|
#endif
|
||||||
#include "qwaylanddnd_p.h"
|
#include "qwaylanddnd_p.h"
|
||||||
#include "qwaylandwindowmanagerintegration_p.h"
|
#include "qwaylandwindowmanagerintegration_p.h"
|
||||||
#include "qwaylandscreen_p.h"
|
#include "qwaylandscreen_p.h"
|
||||||
@ -132,8 +134,10 @@ QWaylandIntegration::QWaylandIntegration()
|
|||||||
{
|
{
|
||||||
initializeInputDeviceIntegration();
|
initializeInputDeviceIntegration();
|
||||||
mDisplay.reset(new QWaylandDisplay(this));
|
mDisplay.reset(new QWaylandDisplay(this));
|
||||||
#if QT_CONFIG(draganddrop)
|
#if QT_CONFIG(clipboard)
|
||||||
mClipboard.reset(new QWaylandClipboard(mDisplay.data()));
|
mClipboard.reset(new QWaylandClipboard(mDisplay.data()));
|
||||||
|
#endif
|
||||||
|
#if QT_CONFIG(draganddrop)
|
||||||
mDrag.reset(new QWaylandDrag(mDisplay.data()));
|
mDrag.reset(new QWaylandDrag(mDisplay.data()));
|
||||||
#endif
|
#endif
|
||||||
QString icStr = QPlatformInputContextFactory::requested();
|
QString icStr = QPlatformInputContextFactory::requested();
|
||||||
@ -229,12 +233,14 @@ QPlatformFontDatabase *QWaylandIntegration::fontDatabase() const
|
|||||||
return mFontDb.data();
|
return mFontDb.data();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if QT_CONFIG(draganddrop)
|
#if QT_CONFIG(clipboard)
|
||||||
QPlatformClipboard *QWaylandIntegration::clipboard() const
|
QPlatformClipboard *QWaylandIntegration::clipboard() const
|
||||||
{
|
{
|
||||||
return mClipboard.data();
|
return mClipboard.data();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if QT_CONFIG(draganddrop)
|
||||||
QPlatformDrag *QWaylandIntegration::drag() const
|
QPlatformDrag *QWaylandIntegration::drag() const
|
||||||
{
|
{
|
||||||
return mDrag.data();
|
return mDrag.data();
|
||||||
|
@ -73,38 +73,40 @@ public:
|
|||||||
QWaylandIntegration();
|
QWaylandIntegration();
|
||||||
~QWaylandIntegration();
|
~QWaylandIntegration();
|
||||||
|
|
||||||
bool hasCapability(QPlatformIntegration::Capability cap) const Q_DECL_OVERRIDE;
|
bool hasCapability(QPlatformIntegration::Capability cap) const override;
|
||||||
QPlatformWindow *createPlatformWindow(QWindow *window) const Q_DECL_OVERRIDE;
|
QPlatformWindow *createPlatformWindow(QWindow *window) const override;
|
||||||
#if QT_CONFIG(opengl)
|
#if QT_CONFIG(opengl)
|
||||||
QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const Q_DECL_OVERRIDE;
|
QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const override;
|
||||||
#endif
|
#endif
|
||||||
QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const Q_DECL_OVERRIDE;
|
QPlatformBackingStore *createPlatformBackingStore(QWindow *window) const override;
|
||||||
|
|
||||||
QAbstractEventDispatcher *createEventDispatcher() const Q_DECL_OVERRIDE;
|
QAbstractEventDispatcher *createEventDispatcher() const override;
|
||||||
void initialize() Q_DECL_OVERRIDE;
|
void initialize() override;
|
||||||
|
|
||||||
QPlatformFontDatabase *fontDatabase() const Q_DECL_OVERRIDE;
|
QPlatformFontDatabase *fontDatabase() const override;
|
||||||
|
|
||||||
QPlatformNativeInterface *nativeInterface() const Q_DECL_OVERRIDE;
|
QPlatformNativeInterface *nativeInterface() const override;
|
||||||
|
#if QT_CONFIG(clipboard)
|
||||||
|
QPlatformClipboard *clipboard() const override;
|
||||||
|
#endif
|
||||||
#if QT_CONFIG(draganddrop)
|
#if QT_CONFIG(draganddrop)
|
||||||
QPlatformClipboard *clipboard() const Q_DECL_OVERRIDE;
|
QPlatformDrag *drag() const override;
|
||||||
QPlatformDrag *drag() const Q_DECL_OVERRIDE;
|
|
||||||
#endif
|
#endif
|
||||||
QPlatformInputContext *inputContext() const Q_DECL_OVERRIDE;
|
QPlatformInputContext *inputContext() const override;
|
||||||
|
|
||||||
QVariant styleHint(StyleHint hint) const Q_DECL_OVERRIDE;
|
QVariant styleHint(StyleHint hint) const override;
|
||||||
|
|
||||||
#if QT_CONFIG(accessibility)
|
#if QT_CONFIG(accessibility)
|
||||||
QPlatformAccessibility *accessibility() const Q_DECL_OVERRIDE;
|
QPlatformAccessibility *accessibility() const override;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QPlatformServices *services() const Q_DECL_OVERRIDE;
|
QPlatformServices *services() const override;
|
||||||
|
|
||||||
QWaylandDisplay *display() const;
|
QWaylandDisplay *display() const;
|
||||||
|
|
||||||
QStringList themeNames() const Q_DECL_OVERRIDE;
|
QStringList themeNames() const override;
|
||||||
|
|
||||||
QPlatformTheme *createPlatformTheme(const QString &name) const Q_DECL_OVERRIDE;
|
QPlatformTheme *createPlatformTheme(const QString &name) const override;
|
||||||
|
|
||||||
QWaylandInputDevice *createInputDevice(QWaylandDisplay *display, int version, uint32_t id);
|
QWaylandInputDevice *createInputDevice(QWaylandDisplay *display, int version, uint32_t id);
|
||||||
|
|
||||||
@ -131,8 +133,10 @@ private:
|
|||||||
QWaylandShellIntegration *createShellIntegration(const QString& interfaceName);
|
QWaylandShellIntegration *createShellIntegration(const QString& interfaceName);
|
||||||
|
|
||||||
QScopedPointer<QPlatformFontDatabase> mFontDb;
|
QScopedPointer<QPlatformFontDatabase> mFontDb;
|
||||||
#if QT_CONFIG(draganddrop)
|
#if QT_CONFIG(clipboard)
|
||||||
QScopedPointer<QPlatformClipboard> mClipboard;
|
QScopedPointer<QPlatformClipboard> mClipboard;
|
||||||
|
#endif
|
||||||
|
#if QT_CONFIG(draganddrop)
|
||||||
QScopedPointer<QPlatformDrag> mDrag;
|
QScopedPointer<QPlatformDrag> mDrag;
|
||||||
#endif
|
#endif
|
||||||
QScopedPointer<QPlatformNativeInterface> mNativeInterface;
|
QScopedPointer<QPlatformNativeInterface> mNativeInterface;
|
||||||
|
@ -67,22 +67,22 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandNativeInterface : public QPlatformNativeIn
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QWaylandNativeInterface(QWaylandIntegration *integration);
|
QWaylandNativeInterface(QWaylandIntegration *integration);
|
||||||
void *nativeResourceForIntegration(const QByteArray &resource) Q_DECL_OVERRIDE;
|
void *nativeResourceForIntegration(const QByteArray &resource) override;
|
||||||
void *nativeResourceForWindow(const QByteArray &resourceString,
|
void *nativeResourceForWindow(const QByteArray &resourceString,
|
||||||
QWindow *window) Q_DECL_OVERRIDE;
|
QWindow *window) override;
|
||||||
void *nativeResourceForScreen(const QByteArray &resourceString,
|
void *nativeResourceForScreen(const QByteArray &resourceString,
|
||||||
QScreen *screen) Q_DECL_OVERRIDE;
|
QScreen *screen) override;
|
||||||
#if QT_CONFIG(opengl)
|
#if QT_CONFIG(opengl)
|
||||||
void *nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context) Q_DECL_OVERRIDE;
|
void *nativeResourceForContext(const QByteArray &resource, QOpenGLContext *context) override;
|
||||||
#endif
|
#endif
|
||||||
QVariantMap windowProperties(QPlatformWindow *window) const Q_DECL_OVERRIDE;
|
QVariantMap windowProperties(QPlatformWindow *window) const override;
|
||||||
QVariant windowProperty(QPlatformWindow *window, const QString &name) const Q_DECL_OVERRIDE;
|
QVariant windowProperty(QPlatformWindow *window, const QString &name) const override;
|
||||||
QVariant windowProperty(QPlatformWindow *window, const QString &name, const QVariant &defaultValue) const Q_DECL_OVERRIDE;
|
QVariant windowProperty(QPlatformWindow *window, const QString &name, const QVariant &defaultValue) const override;
|
||||||
void setWindowProperty(QPlatformWindow *window, const QString &name, const QVariant &value) Q_DECL_OVERRIDE;
|
void setWindowProperty(QPlatformWindow *window, const QString &name, const QVariant &value) override;
|
||||||
|
|
||||||
void emitWindowPropertyChanged(QPlatformWindow *window, const QString &name);
|
void emitWindowPropertyChanged(QPlatformWindow *window, const QString &name);
|
||||||
|
|
||||||
QFunctionPointer platformFunction(const QByteArray &resource) const Q_DECL_OVERRIDE;
|
QFunctionPointer platformFunction(const QByteArray &resource) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QWaylandIntegration *m_integration;
|
QWaylandIntegration *m_integration;
|
||||||
|
@ -80,7 +80,7 @@ private:
|
|||||||
uint32_t nativeModifiers,
|
uint32_t nativeModifiers,
|
||||||
const QString &text,
|
const QString &text,
|
||||||
uint32_t autorep,
|
uint32_t autorep,
|
||||||
uint32_t count) Q_DECL_OVERRIDE;
|
uint32_t count) override;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -64,18 +64,24 @@ QWaylandScreen::QWaylandScreen(QWaylandDisplay *waylandDisplay, int version, uin
|
|||||||
, mFormat(QImage::Format_ARGB32_Premultiplied)
|
, mFormat(QImage::Format_ARGB32_Premultiplied)
|
||||||
, mOutputName(QStringLiteral("Screen%1").arg(id))
|
, mOutputName(QStringLiteral("Screen%1").arg(id))
|
||||||
, m_orientation(Qt::PrimaryOrientation)
|
, m_orientation(Qt::PrimaryOrientation)
|
||||||
|
#if QT_CONFIG(cursor)
|
||||||
, mWaylandCursor(0)
|
, mWaylandCursor(0)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
QWaylandScreen::~QWaylandScreen()
|
QWaylandScreen::~QWaylandScreen()
|
||||||
{
|
{
|
||||||
|
#if QT_CONFIG(cursor)
|
||||||
delete mWaylandCursor;
|
delete mWaylandCursor;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void QWaylandScreen::init()
|
void QWaylandScreen::init()
|
||||||
{
|
{
|
||||||
|
#if QT_CONFIG(cursor)
|
||||||
mWaylandCursor = new QWaylandCursor(this);
|
mWaylandCursor = new QWaylandCursor(this);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
QWaylandDisplay * QWaylandScreen::display() const
|
QWaylandDisplay * QWaylandScreen::display() const
|
||||||
@ -156,10 +162,12 @@ qreal QWaylandScreen::refreshRate() const
|
|||||||
return mRefreshRate / 1000.f;
|
return mRefreshRate / 1000.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if QT_CONFIG(cursor)
|
||||||
QPlatformCursor *QWaylandScreen::cursor() const
|
QPlatformCursor *QWaylandScreen::cursor() const
|
||||||
{
|
{
|
||||||
return mWaylandCursor;
|
return mWaylandCursor;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
QWaylandScreen * QWaylandScreen::waylandScreenFromWindow(QWindow *window)
|
QWaylandScreen * QWaylandScreen::waylandScreenFromWindow(QWindow *window)
|
||||||
{
|
{
|
||||||
|
@ -72,26 +72,28 @@ public:
|
|||||||
void init();
|
void init();
|
||||||
QWaylandDisplay *display() const;
|
QWaylandDisplay *display() const;
|
||||||
|
|
||||||
QRect geometry() const Q_DECL_OVERRIDE;
|
QRect geometry() const override;
|
||||||
int depth() const Q_DECL_OVERRIDE;
|
int depth() const override;
|
||||||
QImage::Format format() const Q_DECL_OVERRIDE;
|
QImage::Format format() const override;
|
||||||
|
|
||||||
QSizeF physicalSize() const Q_DECL_OVERRIDE;
|
QSizeF physicalSize() const override;
|
||||||
|
|
||||||
QDpi logicalDpi() const Q_DECL_OVERRIDE;
|
QDpi logicalDpi() const override;
|
||||||
QList<QPlatformScreen *> virtualSiblings() const Q_DECL_OVERRIDE;
|
QList<QPlatformScreen *> virtualSiblings() const override;
|
||||||
|
|
||||||
void setOrientationUpdateMask(Qt::ScreenOrientations mask) Q_DECL_OVERRIDE;
|
void setOrientationUpdateMask(Qt::ScreenOrientations mask) override;
|
||||||
|
|
||||||
Qt::ScreenOrientation orientation() const Q_DECL_OVERRIDE;
|
Qt::ScreenOrientation orientation() const override;
|
||||||
int scale() const;
|
int scale() const;
|
||||||
qreal devicePixelRatio() const Q_DECL_OVERRIDE;
|
qreal devicePixelRatio() const override;
|
||||||
qreal refreshRate() const Q_DECL_OVERRIDE;
|
qreal refreshRate() const override;
|
||||||
|
|
||||||
QString name() const Q_DECL_OVERRIDE { return mOutputName; }
|
QString name() const override { return mOutputName; }
|
||||||
|
|
||||||
QPlatformCursor *cursor() const Q_DECL_OVERRIDE;
|
#if QT_CONFIG(cursor)
|
||||||
|
QPlatformCursor *cursor() const override;
|
||||||
QWaylandCursor *waylandCursor() const { return mWaylandCursor; };
|
QWaylandCursor *waylandCursor() const { return mWaylandCursor; };
|
||||||
|
#endif
|
||||||
|
|
||||||
uint32_t outputId() const { return m_outputId; }
|
uint32_t outputId() const { return m_outputId; }
|
||||||
::wl_output *output() { return object(); }
|
::wl_output *output() { return object(); }
|
||||||
@ -99,15 +101,15 @@ public:
|
|||||||
static QWaylandScreen *waylandScreenFromWindow(QWindow *window);
|
static QWaylandScreen *waylandScreenFromWindow(QWindow *window);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void output_mode(uint32_t flags, int width, int height, int refresh) Q_DECL_OVERRIDE;
|
void output_mode(uint32_t flags, int width, int height, int refresh) override;
|
||||||
void output_geometry(int32_t x, int32_t y,
|
void output_geometry(int32_t x, int32_t y,
|
||||||
int32_t width, int32_t height,
|
int32_t width, int32_t height,
|
||||||
int subpixel,
|
int subpixel,
|
||||||
const QString &make,
|
const QString &make,
|
||||||
const QString &model,
|
const QString &model,
|
||||||
int32_t transform) Q_DECL_OVERRIDE;
|
int32_t transform) override;
|
||||||
void output_scale(int32_t factor) Q_DECL_OVERRIDE;
|
void output_scale(int32_t factor) override;
|
||||||
void output_done() Q_DECL_OVERRIDE;
|
void output_done() override;
|
||||||
|
|
||||||
int m_outputId;
|
int m_outputId;
|
||||||
QWaylandDisplay *mWaylandDisplay;
|
QWaylandDisplay *mWaylandDisplay;
|
||||||
@ -121,7 +123,9 @@ private:
|
|||||||
QString mOutputName;
|
QString mOutputName;
|
||||||
Qt::ScreenOrientation m_orientation;
|
Qt::ScreenOrientation m_orientation;
|
||||||
|
|
||||||
|
#if QT_CONFIG(cursor)
|
||||||
QWaylandCursor *mWaylandCursor;
|
QWaylandCursor *mWaylandCursor;
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -72,8 +72,8 @@ public:
|
|||||||
QWaylandShmBuffer(QWaylandDisplay *display,
|
QWaylandShmBuffer(QWaylandDisplay *display,
|
||||||
const QSize &size, QImage::Format format, int scale = 1);
|
const QSize &size, QImage::Format format, int scale = 1);
|
||||||
~QWaylandShmBuffer();
|
~QWaylandShmBuffer();
|
||||||
QSize size() const Q_DECL_OVERRIDE { return mImage.size(); }
|
QSize size() const override { return mImage.size(); }
|
||||||
int scale() const Q_DECL_OVERRIDE { return int(mImage.devicePixelRatio()); }
|
int scale() const override { return int(mImage.devicePixelRatio()); }
|
||||||
QImage *image() { return &mImage; }
|
QImage *image() { return &mImage; }
|
||||||
|
|
||||||
QImage *imageInsideMargins(const QMargins &margins);
|
QImage *imageInsideMargins(const QMargins &margins);
|
||||||
@ -91,11 +91,11 @@ public:
|
|||||||
~QWaylandShmBackingStore();
|
~QWaylandShmBackingStore();
|
||||||
|
|
||||||
QPaintDevice *paintDevice();
|
QPaintDevice *paintDevice();
|
||||||
void flush(QWindow *window, const QRegion ®ion, const QPoint &offset) Q_DECL_OVERRIDE;
|
void flush(QWindow *window, const QRegion ®ion, const QPoint &offset) override;
|
||||||
void resize(const QSize &size, const QRegion &staticContents) Q_DECL_OVERRIDE;
|
void resize(const QSize &size, const QRegion &staticContents) override;
|
||||||
void resize(const QSize &size);
|
void resize(const QSize &size);
|
||||||
void beginPaint(const QRegion &) Q_DECL_OVERRIDE;
|
void beginPaint(const QRegion &) override;
|
||||||
void endPaint() Q_DECL_OVERRIDE;
|
void endPaint() override;
|
||||||
|
|
||||||
QWaylandAbstractDecoration *windowDecoration() const;
|
QWaylandAbstractDecoration *windowDecoration() const;
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ public:
|
|||||||
void iterateBuffer();
|
void iterateBuffer();
|
||||||
|
|
||||||
#if QT_CONFIG(opengl)
|
#if QT_CONFIG(opengl)
|
||||||
QImage toImage() const Q_DECL_OVERRIDE;
|
QImage toImage() const override;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -64,8 +64,8 @@ public:
|
|||||||
QWaylandShmWindow(QWindow *window);
|
QWaylandShmWindow(QWindow *window);
|
||||||
~QWaylandShmWindow();
|
~QWaylandShmWindow();
|
||||||
|
|
||||||
WindowType windowType() const Q_DECL_OVERRIDE;
|
WindowType windowType() const override;
|
||||||
QSurfaceFormat format() const Q_DECL_OVERRIDE { return QSurfaceFormat(); }
|
QSurfaceFormat format() const override { return QSurfaceFormat(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -88,8 +88,8 @@ private:
|
|||||||
int32_t velocity_x,
|
int32_t velocity_x,
|
||||||
int32_t velocity_y,
|
int32_t velocity_y,
|
||||||
uint32_t flags,
|
uint32_t flags,
|
||||||
struct wl_array *rawdata) Q_DECL_OVERRIDE;
|
struct wl_array *rawdata) override;
|
||||||
void touch_extension_configure(uint32_t flags) Q_DECL_OVERRIDE;
|
void touch_extension_configure(uint32_t flags) override;
|
||||||
|
|
||||||
void sendTouchEvent();
|
void sendTouchEvent();
|
||||||
|
|
||||||
|
@ -176,6 +176,9 @@ void QWaylandWindow::initWindow()
|
|||||||
mShellSurface->setAppId(appId);
|
mShellSurface->setAppId(appId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// the user may have already set some window properties, so make sure to send them out
|
||||||
|
for (auto it = m_properties.cbegin(); it != m_properties.cend(); ++it)
|
||||||
|
mShellSurface->sendProperty(it.key(), it.value());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Enable high-dpi rendering. Scale() returns the screen scale factor and will
|
// Enable high-dpi rendering. Scale() returns the screen scale factor and will
|
||||||
@ -713,8 +716,10 @@ void QWaylandWindow::handleMouse(QWaylandInputDevice *inputDevice, const QWaylan
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if QT_CONFIG(cursor)
|
||||||
if (e.type == QWaylandPointerEvent::Enter)
|
if (e.type == QWaylandPointerEvent::Enter)
|
||||||
restoreMouseCursor(inputDevice);
|
restoreMouseCursor(inputDevice);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void QWaylandWindow::handleMouseLeave(QWaylandInputDevice *inputDevice)
|
void QWaylandWindow::handleMouseLeave(QWaylandInputDevice *inputDevice)
|
||||||
@ -726,7 +731,9 @@ void QWaylandWindow::handleMouseLeave(QWaylandInputDevice *inputDevice)
|
|||||||
} else {
|
} else {
|
||||||
QWindowSystemInterface::handleLeaveEvent(window());
|
QWindowSystemInterface::handleLeaveEvent(window());
|
||||||
}
|
}
|
||||||
|
#if QT_CONFIG(cursor)
|
||||||
restoreMouseCursor(inputDevice);
|
restoreMouseCursor(inputDevice);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QWaylandWindow::touchDragDecoration(QWaylandInputDevice *inputDevice, const QPointF &local, const QPointF &global, Qt::TouchPointState state, Qt::KeyboardModifiers mods)
|
bool QWaylandWindow::touchDragDecoration(QWaylandInputDevice *inputDevice, const QPointF &local, const QPointF &global, Qt::TouchPointState state, Qt::KeyboardModifiers mods)
|
||||||
@ -758,7 +765,9 @@ void QWaylandWindow::handleMouseEventWithDecoration(QWaylandInputDevice *inputDe
|
|||||||
globalTranslated.setX(globalTranslated.x() - marg.left());
|
globalTranslated.setX(globalTranslated.x() - marg.left());
|
||||||
globalTranslated.setY(globalTranslated.y() - marg.top());
|
globalTranslated.setY(globalTranslated.y() - marg.top());
|
||||||
if (!mMouseEventsInContentArea) {
|
if (!mMouseEventsInContentArea) {
|
||||||
|
#if QT_CONFIG(cursor)
|
||||||
restoreMouseCursor(inputDevice);
|
restoreMouseCursor(inputDevice);
|
||||||
|
#endif
|
||||||
QWindowSystemInterface::handleEnterEvent(window());
|
QWindowSystemInterface::handleEnterEvent(window());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -784,6 +793,7 @@ void QWaylandWindow::handleMouseEventWithDecoration(QWaylandInputDevice *inputDe
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if QT_CONFIG(cursor)
|
||||||
void QWaylandWindow::setMouseCursor(QWaylandInputDevice *device, const QCursor &cursor)
|
void QWaylandWindow::setMouseCursor(QWaylandInputDevice *device, const QCursor &cursor)
|
||||||
{
|
{
|
||||||
device->setCursor(cursor, mScreen);
|
device->setCursor(cursor, mScreen);
|
||||||
@ -793,6 +803,7 @@ void QWaylandWindow::restoreMouseCursor(QWaylandInputDevice *device)
|
|||||||
{
|
{
|
||||||
setMouseCursor(device, window()->cursor());
|
setMouseCursor(device, window()->cursor());
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void QWaylandWindow::requestActivateWindow()
|
void QWaylandWindow::requestActivateWindow()
|
||||||
{
|
{
|
||||||
|
@ -111,16 +111,16 @@ public:
|
|||||||
~QWaylandWindow();
|
~QWaylandWindow();
|
||||||
|
|
||||||
virtual WindowType windowType() const = 0;
|
virtual WindowType windowType() const = 0;
|
||||||
WId winId() const Q_DECL_OVERRIDE;
|
WId winId() const override;
|
||||||
void setVisible(bool visible) Q_DECL_OVERRIDE;
|
void setVisible(bool visible) override;
|
||||||
void setParent(const QPlatformWindow *parent) Q_DECL_OVERRIDE;
|
void setParent(const QPlatformWindow *parent) override;
|
||||||
|
|
||||||
void setWindowTitle(const QString &title) Q_DECL_OVERRIDE;
|
void setWindowTitle(const QString &title) override;
|
||||||
|
|
||||||
inline QIcon windowIcon() const;
|
inline QIcon windowIcon() const;
|
||||||
void setWindowIcon(const QIcon &icon) Q_DECL_OVERRIDE;
|
void setWindowIcon(const QIcon &icon) override;
|
||||||
|
|
||||||
void setGeometry(const QRect &rect) Q_DECL_OVERRIDE;
|
void setGeometry(const QRect &rect) override;
|
||||||
|
|
||||||
void configure(uint32_t edges, int32_t width, int32_t height);
|
void configure(uint32_t edges, int32_t width, int32_t height);
|
||||||
|
|
||||||
@ -136,7 +136,7 @@ public:
|
|||||||
|
|
||||||
void waitForFrameSync();
|
void waitForFrameSync();
|
||||||
|
|
||||||
QMargins frameMargins() const Q_DECL_OVERRIDE;
|
QMargins frameMargins() const override;
|
||||||
|
|
||||||
static QWaylandWindow *fromWlSurface(::wl_surface *surface);
|
static QWaylandWindow *fromWlSurface(::wl_surface *surface);
|
||||||
|
|
||||||
@ -145,22 +145,22 @@ public:
|
|||||||
QWaylandSubSurface *subSurfaceWindow() const;
|
QWaylandSubSurface *subSurfaceWindow() const;
|
||||||
QWaylandScreen *screen() const { return mScreen; }
|
QWaylandScreen *screen() const { return mScreen; }
|
||||||
|
|
||||||
void handleContentOrientationChange(Qt::ScreenOrientation orientation) Q_DECL_OVERRIDE;
|
void handleContentOrientationChange(Qt::ScreenOrientation orientation) override;
|
||||||
void setOrientationMask(Qt::ScreenOrientations mask);
|
void setOrientationMask(Qt::ScreenOrientations mask);
|
||||||
|
|
||||||
void setWindowState(Qt::WindowState state) Q_DECL_OVERRIDE;
|
void setWindowState(Qt::WindowState state) override;
|
||||||
void setWindowFlags(Qt::WindowFlags flags) Q_DECL_OVERRIDE;
|
void setWindowFlags(Qt::WindowFlags flags) override;
|
||||||
|
|
||||||
void raise() Q_DECL_OVERRIDE;
|
void raise() override;
|
||||||
void lower() Q_DECL_OVERRIDE;
|
void lower() override;
|
||||||
|
|
||||||
void setMask(const QRegion ®ion) Q_DECL_OVERRIDE;
|
void setMask(const QRegion ®ion) override;
|
||||||
|
|
||||||
int scale() const;
|
int scale() const;
|
||||||
qreal devicePixelRatio() const Q_DECL_OVERRIDE;
|
qreal devicePixelRatio() const override;
|
||||||
|
|
||||||
void requestActivateWindow() Q_DECL_OVERRIDE;
|
void requestActivateWindow() override;
|
||||||
bool isExposed() const Q_DECL_OVERRIDE;
|
bool isExposed() const override;
|
||||||
void unfocus();
|
void unfocus();
|
||||||
|
|
||||||
QWaylandAbstractDecoration *decoration() const;
|
QWaylandAbstractDecoration *decoration() const;
|
||||||
@ -176,8 +176,10 @@ public:
|
|||||||
inline bool isMaximized() const { return mState == Qt::WindowMaximized; }
|
inline bool isMaximized() const { return mState == Qt::WindowMaximized; }
|
||||||
inline bool isFullscreen() const { return mState == Qt::WindowFullScreen; }
|
inline bool isFullscreen() const { return mState == Qt::WindowFullScreen; }
|
||||||
|
|
||||||
|
#if QT_CONFIG(cursor)
|
||||||
void setMouseCursor(QWaylandInputDevice *device, const QCursor &cursor);
|
void setMouseCursor(QWaylandInputDevice *device, const QCursor &cursor);
|
||||||
void restoreMouseCursor(QWaylandInputDevice *device);
|
void restoreMouseCursor(QWaylandInputDevice *device);
|
||||||
|
#endif
|
||||||
|
|
||||||
QWaylandWindow *transientParent() const;
|
QWaylandWindow *transientParent() const;
|
||||||
|
|
||||||
@ -185,7 +187,7 @@ public:
|
|||||||
void doResize();
|
void doResize();
|
||||||
void setCanResize(bool canResize);
|
void setCanResize(bool canResize);
|
||||||
|
|
||||||
bool setMouseGrabEnabled(bool grab) Q_DECL_OVERRIDE;
|
bool setMouseGrabEnabled(bool grab) override;
|
||||||
static QWaylandWindow *mouseGrab() { return mMouseGrab; }
|
static QWaylandWindow *mouseGrab() { return mMouseGrab; }
|
||||||
|
|
||||||
void sendProperty(const QString &name, const QVariant &value);
|
void sendProperty(const QString &name, const QVariant &value);
|
||||||
@ -198,11 +200,11 @@ public:
|
|||||||
void setBackingStore(QWaylandShmBackingStore *backingStore) { mBackingStore = backingStore; }
|
void setBackingStore(QWaylandShmBackingStore *backingStore) { mBackingStore = backingStore; }
|
||||||
QWaylandShmBackingStore *backingStore() const { return mBackingStore; }
|
QWaylandShmBackingStore *backingStore() const { return mBackingStore; }
|
||||||
|
|
||||||
bool setKeyboardGrabEnabled(bool) Q_DECL_OVERRIDE { return false; }
|
bool setKeyboardGrabEnabled(bool) override { return false; }
|
||||||
void propagateSizeHints() Q_DECL_OVERRIDE { }
|
void propagateSizeHints() override { }
|
||||||
void addAttachOffset(const QPoint point);
|
void addAttachOffset(const QPoint point);
|
||||||
|
|
||||||
void requestUpdate() Q_DECL_OVERRIDE;
|
void requestUpdate() override;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void requestResize();
|
void requestResize();
|
||||||
|
@ -77,10 +77,10 @@ public:
|
|||||||
explicit QWaylandWindowManagerIntegration(QWaylandDisplay *waylandDisplay);
|
explicit QWaylandWindowManagerIntegration(QWaylandDisplay *waylandDisplay);
|
||||||
virtual ~QWaylandWindowManagerIntegration();
|
virtual ~QWaylandWindowManagerIntegration();
|
||||||
|
|
||||||
QByteArray desktopEnvironment() const Q_DECL_OVERRIDE;
|
QByteArray desktopEnvironment() const override;
|
||||||
|
|
||||||
bool openUrl(const QUrl &url) Q_DECL_OVERRIDE;
|
bool openUrl(const QUrl &url) override;
|
||||||
bool openDocument(const QUrl &url) Q_DECL_OVERRIDE;
|
bool openDocument(const QUrl &url) override;
|
||||||
|
|
||||||
bool showIsFullScreen() const;
|
bool showIsFullScreen() const;
|
||||||
|
|
||||||
@ -90,8 +90,8 @@ private:
|
|||||||
|
|
||||||
QScopedPointer<QWaylandWindowManagerIntegrationPrivate> d_ptr;
|
QScopedPointer<QWaylandWindowManagerIntegrationPrivate> d_ptr;
|
||||||
|
|
||||||
void windowmanager_hints(int32_t showIsFullScreen) Q_DECL_OVERRIDE;
|
void windowmanager_hints(int32_t showIsFullScreen) override;
|
||||||
void windowmanager_quit() Q_DECL_OVERRIDE;
|
void windowmanager_quit() override;
|
||||||
|
|
||||||
void openUrl_helper(const QUrl &url);
|
void openUrl_helper(const QUrl &url);
|
||||||
};
|
};
|
||||||
|
@ -58,8 +58,8 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandWlShellIntegration : public QWaylandShellI
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static QWaylandWlShellIntegration *create(QWaylandDisplay* display);
|
static QWaylandWlShellIntegration *create(QWaylandDisplay* display);
|
||||||
bool initialize(QWaylandDisplay *) Q_DECL_OVERRIDE;
|
bool initialize(QWaylandDisplay *) override;
|
||||||
QWaylandShellSurface *createShellSurface(QWaylandWindow *window) Q_DECL_OVERRIDE;
|
QWaylandShellSurface *createShellSurface(QWaylandWindow *window) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QWaylandWlShellIntegration(QWaylandDisplay* display);
|
QWaylandWlShellIntegration(QWaylandDisplay* display);
|
||||||
|
@ -78,27 +78,27 @@ public:
|
|||||||
virtual ~QWaylandWlShellSurface();
|
virtual ~QWaylandWlShellSurface();
|
||||||
|
|
||||||
using QtWayland::wl_shell_surface::resize;
|
using QtWayland::wl_shell_surface::resize;
|
||||||
void resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges) Q_DECL_OVERRIDE;
|
void resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges) override;
|
||||||
|
|
||||||
using QtWayland::wl_shell_surface::move;
|
using QtWayland::wl_shell_surface::move;
|
||||||
void move(QWaylandInputDevice *inputDevice) Q_DECL_OVERRIDE;
|
void move(QWaylandInputDevice *inputDevice) override;
|
||||||
|
|
||||||
void setTitle(const QString & title) Q_DECL_OVERRIDE;
|
void setTitle(const QString & title) override;
|
||||||
void setAppId(const QString &appId) Q_DECL_OVERRIDE;
|
void setAppId(const QString &appId) override;
|
||||||
|
|
||||||
void raise() Q_DECL_OVERRIDE;
|
void raise() override;
|
||||||
void lower() Q_DECL_OVERRIDE;
|
void lower() override;
|
||||||
void setContentOrientationMask(Qt::ScreenOrientations orientation) Q_DECL_OVERRIDE;
|
void setContentOrientationMask(Qt::ScreenOrientations orientation) override;
|
||||||
void setWindowFlags(Qt::WindowFlags flags) Q_DECL_OVERRIDE;
|
void setWindowFlags(Qt::WindowFlags flags) override;
|
||||||
void sendProperty(const QString &name, const QVariant &value) Q_DECL_OVERRIDE;
|
void sendProperty(const QString &name, const QVariant &value) override;
|
||||||
|
|
||||||
void setType(Qt::WindowType type, QWaylandWindow *transientParent) override;
|
void setType(Qt::WindowType type, QWaylandWindow *transientParent) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setMaximized() Q_DECL_OVERRIDE;
|
void setMaximized() override;
|
||||||
void setFullscreen() Q_DECL_OVERRIDE;
|
void setFullscreen() override;
|
||||||
void setNormal() Q_DECL_OVERRIDE;
|
void setNormal() override;
|
||||||
void setMinimized() Q_DECL_OVERRIDE;
|
void setMinimized() override;
|
||||||
|
|
||||||
void setTopLevel();
|
void setTopLevel();
|
||||||
void updateTransientParent(QWindow *parent);
|
void updateTransientParent(QWindow *parent);
|
||||||
@ -110,11 +110,11 @@ private:
|
|||||||
QSize m_size;
|
QSize m_size;
|
||||||
QWaylandExtendedSurface *m_extendedWindow;
|
QWaylandExtendedSurface *m_extendedWindow;
|
||||||
|
|
||||||
void shell_surface_ping(uint32_t serial) Q_DECL_OVERRIDE;
|
void shell_surface_ping(uint32_t serial) override;
|
||||||
void shell_surface_configure(uint32_t edges,
|
void shell_surface_configure(uint32_t edges,
|
||||||
int32_t width,
|
int32_t width,
|
||||||
int32_t height) Q_DECL_OVERRIDE;
|
int32_t height) override;
|
||||||
void shell_surface_popup_done() Q_DECL_OVERRIDE;
|
void shell_surface_popup_done() override;
|
||||||
|
|
||||||
friend class QWaylandWindow;
|
friend class QWaylandWindow;
|
||||||
};
|
};
|
||||||
|
@ -82,7 +82,7 @@ public:
|
|||||||
QWaylandXdgPopup *createXdgPopup(QWaylandWindow *window);
|
QWaylandXdgPopup *createXdgPopup(QWaylandWindow *window);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void xdg_shell_ping(uint32_t serial) Q_DECL_OVERRIDE;
|
void xdg_shell_ping(uint32_t serial) override;
|
||||||
|
|
||||||
QVector<QWaylandWindow *> m_popups;
|
QVector<QWaylandWindow *> m_popups;
|
||||||
uint m_popupSerial;
|
uint m_popupSerial;
|
||||||
|
@ -59,9 +59,9 @@ class Q_WAYLAND_CLIENT_EXPORT QWaylandXdgShellIntegration : public QWaylandShell
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static QWaylandXdgShellIntegration *create(QWaylandDisplay* display);
|
static QWaylandXdgShellIntegration *create(QWaylandDisplay* display);
|
||||||
bool initialize(QWaylandDisplay *display) Q_DECL_OVERRIDE;
|
bool initialize(QWaylandDisplay *display) override;
|
||||||
QWaylandShellSurface *createShellSurface(QWaylandWindow *window) Q_DECL_OVERRIDE;
|
QWaylandShellSurface *createShellSurface(QWaylandWindow *window) override;
|
||||||
void handleKeyboardFocusChanged(QWaylandWindow *newFocus, QWaylandWindow *oldFocus) Q_DECL_OVERRIDE;
|
void handleKeyboardFocusChanged(QWaylandWindow *newFocus, QWaylandWindow *oldFocus) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QWaylandXdgShellIntegration(QWaylandDisplay *display);
|
QWaylandXdgShellIntegration(QWaylandDisplay *display);
|
||||||
|
@ -82,19 +82,19 @@ public:
|
|||||||
using QtWayland::xdg_surface::resize;
|
using QtWayland::xdg_surface::resize;
|
||||||
void resize(QWaylandInputDevice *inputDevice, enum resize_edge edges);
|
void resize(QWaylandInputDevice *inputDevice, enum resize_edge edges);
|
||||||
|
|
||||||
void resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges) Q_DECL_OVERRIDE;
|
void resize(QWaylandInputDevice *inputDevice, enum wl_shell_surface_resize edges) override;
|
||||||
|
|
||||||
using QtWayland::xdg_surface::move;
|
using QtWayland::xdg_surface::move;
|
||||||
void move(QWaylandInputDevice *inputDevice) Q_DECL_OVERRIDE;
|
void move(QWaylandInputDevice *inputDevice) override;
|
||||||
|
|
||||||
void setTitle(const QString &title) Q_DECL_OVERRIDE;
|
void setTitle(const QString &title) override;
|
||||||
void setAppId(const QString &appId) Q_DECL_OVERRIDE;
|
void setAppId(const QString &appId) override;
|
||||||
|
|
||||||
void raise() Q_DECL_OVERRIDE;
|
void raise() override;
|
||||||
void lower() Q_DECL_OVERRIDE;
|
void lower() override;
|
||||||
void setContentOrientationMask(Qt::ScreenOrientations orientation) Q_DECL_OVERRIDE;
|
void setContentOrientationMask(Qt::ScreenOrientations orientation) override;
|
||||||
void setWindowFlags(Qt::WindowFlags flags) Q_DECL_OVERRIDE;
|
void setWindowFlags(Qt::WindowFlags flags) override;
|
||||||
void sendProperty(const QString &name, const QVariant &value) Q_DECL_OVERRIDE;
|
void sendProperty(const QString &name, const QVariant &value) override;
|
||||||
|
|
||||||
bool isFullscreen() const { return m_fullscreen; }
|
bool isFullscreen() const { return m_fullscreen; }
|
||||||
bool isMaximized() const { return m_maximized; }
|
bool isMaximized() const { return m_maximized; }
|
||||||
@ -102,10 +102,10 @@ public:
|
|||||||
void setType(Qt::WindowType type, QWaylandWindow *transientParent) override;
|
void setType(Qt::WindowType type, QWaylandWindow *transientParent) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setMaximized() Q_DECL_OVERRIDE;
|
void setMaximized() override;
|
||||||
void setFullscreen() Q_DECL_OVERRIDE;
|
void setFullscreen() override;
|
||||||
void setNormal() Q_DECL_OVERRIDE;
|
void setNormal() override;
|
||||||
void setMinimized() Q_DECL_OVERRIDE;
|
void setMinimized() override;
|
||||||
|
|
||||||
void updateTransientParent(QWaylandWindow *parent);
|
void updateTransientParent(QWaylandWindow *parent);
|
||||||
|
|
||||||
@ -123,8 +123,8 @@ private:
|
|||||||
void xdg_surface_configure(int32_t width,
|
void xdg_surface_configure(int32_t width,
|
||||||
int32_t height,
|
int32_t height,
|
||||||
struct wl_array *states,
|
struct wl_array *states,
|
||||||
uint32_t serial) Q_DECL_OVERRIDE;
|
uint32_t serial) override;
|
||||||
void xdg_surface_close() Q_DECL_OVERRIDE;
|
void xdg_surface_close() override;
|
||||||
|
|
||||||
friend class QWaylandWindow;
|
friend class QWaylandWindow;
|
||||||
};
|
};
|
||||||
|
@ -54,10 +54,10 @@ public:
|
|||||||
Touch *touch() const { return m_touch.data(); }
|
Touch *touch() const { return m_touch.data(); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void seat_bind_resource(Resource *resource) Q_DECL_OVERRIDE;
|
void seat_bind_resource(Resource *resource) override;
|
||||||
void seat_get_keyboard(Resource *resource, uint32_t id) Q_DECL_OVERRIDE;
|
void seat_get_keyboard(Resource *resource, uint32_t id) override;
|
||||||
void seat_get_pointer(Resource *resource, uint32_t id) Q_DECL_OVERRIDE;
|
void seat_get_pointer(Resource *resource, uint32_t id) override;
|
||||||
void seat_get_touch(Resource *resource, uint32_t id) Q_DECL_OVERRIDE;
|
void seat_get_touch(Resource *resource, uint32_t id) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Compositor *m_compositor;
|
Compositor *m_compositor;
|
||||||
@ -80,7 +80,7 @@ public:
|
|||||||
void sendKey(uint32_t key, uint32_t state);
|
void sendKey(uint32_t key, uint32_t state);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void keyboard_destroy_resource(wl_keyboard::Resource *resource) Q_DECL_OVERRIDE;
|
void keyboard_destroy_resource(wl_keyboard::Resource *resource) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Compositor *m_compositor;
|
Compositor *m_compositor;
|
||||||
@ -103,7 +103,7 @@ public:
|
|||||||
void sendButton(uint32_t button, uint32_t state);
|
void sendButton(uint32_t button, uint32_t state);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void pointer_destroy_resource(wl_pointer::Resource *resource) Q_DECL_OVERRIDE;
|
void pointer_destroy_resource(wl_pointer::Resource *resource) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Compositor *m_compositor;
|
Compositor *m_compositor;
|
||||||
@ -158,7 +158,7 @@ public:
|
|||||||
DataDevice *dataDevice() const;
|
DataDevice *dataDevice() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void data_device_manager_get_data_device(Resource *resource, uint32_t id, struct ::wl_resource *seat) Q_DECL_OVERRIDE;
|
void data_device_manager_get_data_device(Resource *resource, uint32_t id, struct ::wl_resource *seat) override;
|
||||||
void data_device_manager_create_data_source(Resource *resource, uint32_t id) override;
|
void data_device_manager_create_data_source(Resource *resource, uint32_t id) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -49,16 +49,16 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
void surface_destroy_resource(Resource *resource) Q_DECL_OVERRIDE;
|
void surface_destroy_resource(Resource *resource) override;
|
||||||
|
|
||||||
void surface_destroy(Resource *resource) Q_DECL_OVERRIDE;
|
void surface_destroy(Resource *resource) override;
|
||||||
void surface_attach(Resource *resource,
|
void surface_attach(Resource *resource,
|
||||||
struct wl_resource *buffer, int x, int y) Q_DECL_OVERRIDE;
|
struct wl_resource *buffer, int x, int y) override;
|
||||||
void surface_damage(Resource *resource,
|
void surface_damage(Resource *resource,
|
||||||
int32_t x, int32_t y, int32_t width, int32_t height) Q_DECL_OVERRIDE;
|
int32_t x, int32_t y, int32_t width, int32_t height) override;
|
||||||
void surface_frame(Resource *resource,
|
void surface_frame(Resource *resource,
|
||||||
uint32_t callback) Q_DECL_OVERRIDE;
|
uint32_t callback) override;
|
||||||
void surface_commit(Resource *resource) Q_DECL_OVERRIDE;
|
void surface_commit(Resource *resource) override;
|
||||||
private:
|
private:
|
||||||
wl_resource *m_buffer;
|
wl_resource *m_buffer;
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ public:
|
|||||||
++mouseReleaseEventCount;
|
++mouseReleaseEventCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
void touchEvent(QTouchEvent *event) Q_DECL_OVERRIDE
|
void touchEvent(QTouchEvent *event) override
|
||||||
{
|
{
|
||||||
++touchEventCount;
|
++touchEventCount;
|
||||||
}
|
}
|
||||||
@ -269,7 +269,7 @@ public:
|
|||||||
bool dragStarted;
|
bool dragStarted;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE
|
void mousePressEvent(QMouseEvent *event) override
|
||||||
{
|
{
|
||||||
if (dragStarted)
|
if (dragStarted)
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user