From 048fa7f52cbfee1351e5c2d6420f438fa733106e Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Thu, 23 Aug 2018 08:40:03 +0200 Subject: Compositor: Fix resize grab release for xdg-shell-v6 The grab was only released for the move state, so if a window was resized, it would continue to be in the resize state until it was moved. This makes sure all grabs are released when the mouse is released. [ChangeLog][Compositor] Fixed a bug where ShellSurfaceItems for XdgToplevelV6s wouldn't stop resizing. Task-number: QTBUG-70126 Change-Id: I37d8359dca5f21f2fb52b781a94846a961211a02 Reviewed-by: Paul Olav Tvete --- src/compositor/extensions/qwaylandxdgshellv6integration.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compositor/extensions/qwaylandxdgshellv6integration.cpp b/src/compositor/extensions/qwaylandxdgshellv6integration.cpp index 17ee10db..94a03ec0 100644 --- a/src/compositor/extensions/qwaylandxdgshellv6integration.cpp +++ b/src/compositor/extensions/qwaylandxdgshellv6integration.cpp @@ -95,7 +95,7 @@ bool XdgToplevelV6Integration::mouseReleaseEvent(QMouseEvent *event) { Q_UNUSED(event); - if (grabberState == GrabberState::Move) { + if (grabberState != GrabberState::Default) { grabberState = GrabberState::Default; return true; } -- cgit v1.2.1 From 53dff95bfbe9070c4cd17045f3d5147f29710c5f Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Fri, 24 Aug 2018 14:16:29 +0200 Subject: Compositor: Fix OpenGL textures deleted prematurely [ChangeLog][Compositor] Fixed a bug where destroying a WaylandQuickItem would delete the OpenGL texture for all other WaylandQuickItems using that surface. The texture QWaylandBufferRef::toOpenGLTexture returns is owned by the buffer (documented public API), so setting QQuickWindow::TextureOwnsGLTexture in QWaylandTextureProvider is wrong. Task-number: QTBUG-70163 Change-Id: I831f2aa81ed20c08d4d87bccac33650ab86d19c8 Reviewed-by: Paul Olav Tvete --- src/compositor/compositor_api/qwaylandquickitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compositor/compositor_api/qwaylandquickitem.cpp b/src/compositor/compositor_api/qwaylandquickitem.cpp index c61d84d6..1ee6848e 100644 --- a/src/compositor/compositor_api/qwaylandquickitem.cpp +++ b/src/compositor/compositor_api/qwaylandquickitem.cpp @@ -288,7 +288,7 @@ public: m_sgTex->bind(); } } else { - QQuickWindow::CreateTextureOptions opt = QQuickWindow::TextureOwnsGLTexture; + QQuickWindow::CreateTextureOptions opt; QWaylandQuickSurface *surface = qobject_cast(surfaceItem->surface()); if (surface && surface->useTextureAlpha()) { opt |= QQuickWindow::TextureHasAlphaChannel; -- cgit v1.2.1 From c3b6c4d442c8187e43601c548bc58ce3e4fe21f3 Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Fri, 24 Aug 2018 13:03:09 +0200 Subject: Compositor: Don't send illegal leave events If a client doesn't bind to an output, don't try to send leave events for it. ...similarly to how we don't send enter events for it. weston-simple-egl is one such client. [ChangeLog][Compositor] Fixed a bug that caused some clients to abort in libwayland when a surface left an output. Change-Id: Ia7f4c21a7d766092dfb8a20c56fa1128a3046f97 Reviewed-by: Paul Olav Tvete --- src/compositor/compositor_api/qwaylandoutput.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/compositor/compositor_api/qwaylandoutput.cpp b/src/compositor/compositor_api/qwaylandoutput.cpp index f7782da9..415d08f1 100644 --- a/src/compositor/compositor_api/qwaylandoutput.cpp +++ b/src/compositor/compositor_api/qwaylandoutput.cpp @@ -915,7 +915,10 @@ void QWaylandOutput::surfaceLeave(QWaylandSurface *surface) { if (!surface || !surface->client()) return; - QWaylandSurfacePrivate::get(surface)->send_leave(resourceForClient(surface->client())); + + auto *clientResource = resourceForClient(surface->client()); + if (clientResource) + QWaylandSurfacePrivate::get(surface)->send_leave(clientResource); } /*! -- cgit v1.2.1