Merge remote-tracking branch 'origin/5.9' into 5.10
Change-Id: I6c201769561f53d88c89f75cce7d9a7b2643d2f6
This commit is contained in:
commit
4a6dd89b63
@ -7,6 +7,8 @@ OTHER_FILES += \
|
|||||||
|
|
||||||
SOURCES += main.cpp
|
SOURCES += main.cpp
|
||||||
|
|
||||||
|
TARGET = qt-plugin-wayland-egl
|
||||||
|
|
||||||
PLUGIN_TYPE = wayland-graphics-integration-client
|
PLUGIN_TYPE = wayland-graphics-integration-client
|
||||||
PLUGIN_CLASS_NAME = QWaylandEglClientBufferPlugin
|
PLUGIN_CLASS_NAME = QWaylandEglClientBufferPlugin
|
||||||
load(qt_plugin)
|
load(qt_plugin)
|
||||||
|
@ -1031,7 +1031,7 @@ QVariant QWaylandWindow::property(const QString &name, const QVariant &defaultVa
|
|||||||
|
|
||||||
void QWaylandWindow::requestUpdate()
|
void QWaylandWindow::requestUpdate()
|
||||||
{
|
{
|
||||||
if (!mFrameCallback)
|
if (!mWaitingForFrameSync)
|
||||||
QPlatformWindow::requestUpdate();
|
QPlatformWindow::requestUpdate();
|
||||||
else
|
else
|
||||||
mUpdateRequested = true;
|
mUpdateRequested = true;
|
||||||
|
@ -125,6 +125,8 @@ QWaylandXdgSurfaceV6::QWaylandXdgSurfaceV6(QWaylandXdgShellV6 *shell, ::zxdg_sur
|
|||||||
|
|
||||||
QWaylandXdgSurfaceV6::~QWaylandXdgSurfaceV6()
|
QWaylandXdgSurfaceV6::~QWaylandXdgSurfaceV6()
|
||||||
{
|
{
|
||||||
|
if (m_toplevel)
|
||||||
|
zxdg_toplevel_v6_destroy(m_toplevel->object());
|
||||||
if (m_popup)
|
if (m_popup)
|
||||||
zxdg_popup_v6_destroy(m_popup->object());
|
zxdg_popup_v6_destroy(m_popup->object());
|
||||||
destroy();
|
destroy();
|
||||||
|
@ -35,6 +35,8 @@
|
|||||||
#include <QMimeData>
|
#include <QMimeData>
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
#include <QDrag>
|
#include <QDrag>
|
||||||
|
#include <QWindow>
|
||||||
|
#include <QOpenGLWindow>
|
||||||
|
|
||||||
#include <QtTest/QtTest>
|
#include <QtTest/QtTest>
|
||||||
#include <QtWaylandClient/private/qwaylandintegration_p.h>
|
#include <QtWaylandClient/private/qwaylandintegration_p.h>
|
||||||
@ -112,6 +114,25 @@ public:
|
|||||||
QPoint mousePressPos;
|
QPoint mousePressPos;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class TestGlWindow : public QOpenGLWindow
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
TestGlWindow();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void paintGL() override;
|
||||||
|
};
|
||||||
|
|
||||||
|
TestGlWindow::TestGlWindow()
|
||||||
|
{}
|
||||||
|
|
||||||
|
void TestGlWindow::paintGL()
|
||||||
|
{
|
||||||
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
}
|
||||||
|
|
||||||
class tst_WaylandClient : public QObject
|
class tst_WaylandClient : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@ -149,6 +170,7 @@ private slots:
|
|||||||
void dontCrashOnMultipleCommits();
|
void dontCrashOnMultipleCommits();
|
||||||
void hiddenTransientParent();
|
void hiddenTransientParent();
|
||||||
void hiddenPopupParent();
|
void hiddenPopupParent();
|
||||||
|
void glWindow();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MockCompositor *compositor;
|
MockCompositor *compositor;
|
||||||
@ -409,6 +431,21 @@ void tst_WaylandClient::hiddenPopupParent()
|
|||||||
QTRY_VERIFY(compositor->surface());
|
QTRY_VERIFY(compositor->surface());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void tst_WaylandClient::glWindow()
|
||||||
|
{
|
||||||
|
QSKIP("Skipping GL tests, as not supported by all CI systems: See https://bugreports.qt.io/browse/QTBUG-65802");
|
||||||
|
|
||||||
|
QScopedPointer<TestGlWindow> testWindow(new TestGlWindow);
|
||||||
|
testWindow->show();
|
||||||
|
QSharedPointer<MockSurface> surface;
|
||||||
|
QTRY_VERIFY(surface = compositor->surface());
|
||||||
|
|
||||||
|
//confirm we don't crash when we delete an already hidden GL window
|
||||||
|
//QTBUG-65553
|
||||||
|
testWindow->setVisible(false);
|
||||||
|
QTRY_VERIFY(!compositor->surface());
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
setenv("XDG_RUNTIME_DIR", ".", 1);
|
setenv("XDG_RUNTIME_DIR", ".", 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user