pmaports/temp/qt5-qtwayland/0003-Client-Don-t-add-all-windows-to-activePopups.patch
Bhushan Shah 9e3fa6e6f7
temp/qt5-qtwayland: apply patches suggested by upstream (!509)
These patches are intended to make things work nicely due to regressions
introduced in qt5.12.4. I've tested them in QEMU and they seem to work
fine.

See: https://mail.kde.org/pipermail/kde-distro-packagers/2019-July/000379.html
2019-07-18 17:58:25 +05:30

37 lines
1.5 KiB
Diff

From af9ec8a76d7e62444fadb518256fc58723fe5186 Mon Sep 17 00:00:00 2001
From: Johan Klokkhammer Helsing <johan.helsing@qt.io>
Date: Wed, 5 Jun 2019 13:10:38 +0200
Subject: [PATCH 3/8] Client: Don't add all windows to activePopups
Neither Qt::ToolTip nor Qt::Popup are single bits in Qt::WindowFlags, and do in
fact include Qt::Window. This meant that when we or'ed them and did a bitwise
and with QWindow::type(), we would match more types than just Qt::Popup and
Qt::ToolTip. We would for instance get any Qt::Window as well, which meant the
main window would be added to activePopups, leading to strange things
happening, such as crashes and the main window closing unexpectedly.
[ChangeLog][QPA plugin] Fixed a crash when closing multiple popups at once.
Fixes: QTBUG-76124
Change-Id: I1a6a59e161a436604a7ac8ab824396481dc99a20
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
---
src/client/qwaylandwindow.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index 58e0fc58..cecdbda9 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -393,7 +393,7 @@ QWaylandScreen *QWaylandWindow::calculateScreenFromSurfaceEvents() const
void QWaylandWindow::setVisible(bool visible)
{
if (visible) {
- if (window()->type() & (Qt::Popup | Qt::ToolTip))
+ if (window()->type() == Qt::Popup || window()->type() == Qt::ToolTip)
activePopups << this;
initWindow();
mDisplay->flushRequests();
--
2.17.1