diff options
-rw-r--r-- | dist/changes-5.12.2 | 24 | ||||
-rw-r--r-- | src/client/qwaylandabstractdecoration.cpp | 15 | ||||
-rw-r--r-- | src/compositor/compositor_api/qwaylandcompositor.cpp | 3 | ||||
-rw-r--r-- | src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp | 8 |
4 files changed, 45 insertions, 5 deletions
diff --git a/dist/changes-5.12.2 b/dist/changes-5.12.2 new file mode 100644 index 00000000..790c96de --- /dev/null +++ b/dist/changes-5.12.2 @@ -0,0 +1,24 @@ +Qt 5.12.2 is a bug-fix release. It maintains both forward and backward +compatibility (source and binary) with Qt 5.12.0 through 5.12.1. + +For more details, refer to the online documentation included in this +distribution. The documentation is also available online: + +https://doc.qt.io/qt-5/index.html + +The Qt version 5.12 series is binary compatible with the 5.11.x series. +Applications compiled for 5.11 will continue to run with 5.12. + +Some of the changes listed in this file include issue tracking numbers +corresponding to tasks in the Qt Bug Tracker: + +https://bugreports.qt.io/ + +Each of these identifiers can be entered in the bug tracker to obtain more +information about a particular change. + +**************************************************************************** +* QPA plugin * +**************************************************************************** + + - [QTBUG-73524] Fixed a crash that sometimes happened when switching popups. diff --git a/src/client/qwaylandabstractdecoration.cpp b/src/client/qwaylandabstractdecoration.cpp index 0f00b989..87dd6cea 100644 --- a/src/client/qwaylandabstractdecoration.cpp +++ b/src/client/qwaylandabstractdecoration.cpp @@ -100,14 +100,19 @@ void QWaylandAbstractDecoration::setWaylandWindow(QWaylandWindow *window) d->m_wayland_window = window; } -// \a size is without margins +// Creates regions like this on the outside of a rectangle with inner size \a size +// ----- +// | | +// ----- +// I.e. the top and bottom extends into the corners static QRegion marginsRegion(const QSize &size, const QMargins &margins) { QRegion r; - r += QRect(0, 0, size.width(), margins.top()); // top - r += QRect(0, size.height()+margins.top(), size.width(), margins.bottom()); //bottom - r += QRect(0, 0, margins.left(), size.height()); //left - r += QRect(size.width()+margins.left(), 0, margins.right(), size.height()); // right + const int widthWithMargins = margins.left() + size.width() + margins.right(); + r += QRect(0, 0, widthWithMargins, margins.top()); // top + r += QRect(0, size.height()+margins.top(), widthWithMargins, margins.bottom()); //bottom + r += QRect(0, margins.top(), margins.left(), size.height()); //left + r += QRect(size.width()+margins.left(), margins.top(), margins.right(), size.height()); // right return r; } diff --git a/src/compositor/compositor_api/qwaylandcompositor.cpp b/src/compositor/compositor_api/qwaylandcompositor.cpp index 173b50ce..a0d69c52 100644 --- a/src/compositor/compositor_api/qwaylandcompositor.cpp +++ b/src/compositor/compositor_api/qwaylandcompositor.cpp @@ -243,6 +243,9 @@ QWaylandCompositorPrivate::~QWaylandCompositorPrivate() delete data_device_manager; #endif + // Some client buffer integrations need to clean up before the destroying the wl_display + client_buffer_integration.reset(); + wl_display_destroy(display); } diff --git a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp index 2cadf850..88dab2ab 100644 --- a/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp +++ b/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp @@ -186,6 +186,7 @@ public: EGLDisplay egl_display = EGL_NO_DISPLAY; bool valid = false; bool display_bound = false; + ::wl_display *wlDisplay = nullptr; QOffscreenSurface *offscreenSurface = nullptr; QOpenGLContext *localContext = nullptr; QVector<QOpenGLTexture *> orphanedTextures; @@ -394,6 +395,12 @@ WaylandEglClientBufferIntegration::WaylandEglClientBufferIntegration() WaylandEglClientBufferIntegration::~WaylandEglClientBufferIntegration() { WaylandEglClientBufferIntegrationPrivate::shuttingDown = true; + Q_D(WaylandEglClientBufferIntegration); + if (d->egl_unbind_wayland_display && d->display_bound) { + Q_ASSERT(d->wlDisplay); + if (!d->egl_unbind_wayland_display(d->egl_display, d->wlDisplay)) + qWarning() << "Qt Wayland Compositor: eglUnbindWaylandDisplayWL failed"; + } } void WaylandEglClientBufferIntegration::initializeHardware(struct wl_display *display) @@ -450,6 +457,7 @@ void WaylandEglClientBufferIntegration::initializeHardware(struct wl_display *di qWarning("QtCompositor: Could not bind Wayland display. Ignoring."); } } + d->wlDisplay = display; } d->funcs = new QEGLStreamConvenience; |