Sync from SUSE:SLFO:Main qt6-wayland revision 94cc202f518737316538dedaffa33a25
This commit is contained in:
parent
6362ad9209
commit
9f521fde93
@ -0,0 +1,37 @@
|
|||||||
|
From 92bcb8f6b7a852c7a5d662fc34de561692a7a454 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
||||||
|
Date: Thu, 20 Jun 2024 11:25:06 +0300
|
||||||
|
Subject: [PATCH] Client: Ensure that guessed popup parent has a shell surface
|
||||||
|
|
||||||
|
The last input window may not have a shell surface if it is a subsurface
|
||||||
|
or that window has been just made invisible.
|
||||||
|
|
||||||
|
Change-Id: Iad11c68659579429ddc5d9ba0038975b25da8e0d
|
||||||
|
Reviewed-by: David Edmundson <davidedmundson@kde.org>
|
||||||
|
(cherry picked from commit 52c406cec149634680489faeeaf06bb1258cd12f)
|
||||||
|
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
||||||
|
(cherry picked from commit 7d04c18531276c94bfdf2f9a955d6f02554b28b2)
|
||||||
|
---
|
||||||
|
src/client/qwaylandwindow.cpp | 6 ++++--
|
||||||
|
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
|
||||||
|
index 22aeba10..c3725ffc 100644
|
||||||
|
--- a/src/client/qwaylandwindow.cpp
|
||||||
|
+++ b/src/client/qwaylandwindow.cpp
|
||||||
|
@@ -1157,8 +1157,10 @@ QWaylandWindow *QWaylandWindow::guessTransientParent() const
|
||||||
|
return mTopPopup;
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (window()->type() == Qt::ToolTip || window()->type() == Qt::Popup)
|
||||||
|
- return display()->lastInputWindow();
|
||||||
|
+ if (window()->type() == Qt::ToolTip || window()->type() == Qt::Popup) {
|
||||||
|
+ if (auto lastInputWindow = display()->lastInputWindow())
|
||||||
|
+ return closestShellSurfaceWindow(lastInputWindow->window());
|
||||||
|
+ }
|
||||||
|
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.45.2
|
||||||
|
|
@ -0,0 +1,44 @@
|
|||||||
|
From 8811c62a0c31443ee888a67df2e960bc040f3dcc Mon Sep 17 00:00:00 2001
|
||||||
|
From: David Edmundson <davidedmundson@kde.org>
|
||||||
|
Date: Wed, 10 Jul 2024 09:00:33 +0100
|
||||||
|
Subject: [PATCH 1/2] client: Guard against windows being on a null screen
|
||||||
|
|
||||||
|
calculateScreenFromSurfaceEvents uses the screen information from our
|
||||||
|
surface enter events. If this is not set yet, or refers to outputs not
|
||||||
|
yet complete we fall back to the QWindow::screen. This was introduced in
|
||||||
|
e03613524fc9f6be5c4cd7e9bdb00bc09c7f1e0b.
|
||||||
|
|
||||||
|
It was assumed that this would always be a valid value as QtBase keeps
|
||||||
|
it updated, but there are apparently paths for it to still be null.
|
||||||
|
|
||||||
|
It will be evaluated again when the surface receives a wl_enter event or
|
||||||
|
the output that we have entered is finally initialised and we will then
|
||||||
|
be marked as on the correct screen.
|
||||||
|
|
||||||
|
Change-Id: I33b4a5112c3426a8ea523d39a0658ba7ffee5298
|
||||||
|
Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
|
||||||
|
Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
||||||
|
(cherry picked from commit c4f91b479303dda2e49499de249018d7c66c5f99)
|
||||||
|
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
||||||
|
(cherry picked from commit ec07c90cd647fd7a647f3f10dcae4d18699263df)
|
||||||
|
(cherry picked from commit 406995207eae8d644b6e5262aa716a48c7e471a8)
|
||||||
|
---
|
||||||
|
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 22aeba10..c64f3326 100644
|
||||||
|
--- a/src/client/qwaylandwindow.cpp
|
||||||
|
+++ b/src/client/qwaylandwindow.cpp
|
||||||
|
@@ -1405,7 +1405,7 @@ void QWaylandWindow::handleScreensChanged()
|
||||||
|
{
|
||||||
|
QPlatformScreen *newScreen = calculateScreenFromSurfaceEvents();
|
||||||
|
|
||||||
|
- if (newScreen->screen() == window()->screen())
|
||||||
|
+ if (!newScreen || newScreen->screen() == window()->screen())
|
||||||
|
return;
|
||||||
|
|
||||||
|
QWindowSystemInterface::handleWindowScreenChanged(window(), newScreen->QPlatformScreen::screen());
|
||||||
|
--
|
||||||
|
2.45.2
|
||||||
|
|
@ -0,0 +1,86 @@
|
|||||||
|
From be646fd42892d6e59a573a0a188c5ae193d2be83 Mon Sep 17 00:00:00 2001
|
||||||
|
From: David Edmundson <davidedmundson@kde.org>
|
||||||
|
Date: Fri, 5 Jul 2024 16:13:40 +0100
|
||||||
|
Subject: [PATCH 2/2] Client: Improve thread safety determining window size on
|
||||||
|
the render thread
|
||||||
|
|
||||||
|
updateSurface is called from both the render and GUI thread. We
|
||||||
|
therefore need every property referenced to be thread safe.
|
||||||
|
|
||||||
|
Rather than guarding each property we cache the buffer size whenever the
|
||||||
|
window geometry or scale changes and put a mutex round this one
|
||||||
|
variable.
|
||||||
|
|
||||||
|
Change-Id: I4168ced27556e0e4558bbdbd1daa275d7523c33d
|
||||||
|
Reviewed-by: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
||||||
|
(cherry picked from commit 83da29c62f8fb918df8d91826d16b5d5ceb2c704)
|
||||||
|
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
|
||||||
|
(cherry picked from commit f817608c7152487f489d0f3a227c1d0ceb7b0c2c)
|
||||||
|
---
|
||||||
|
.../client/wayland-egl/qwaylandeglwindow.cpp | 20 +++++++++++++++----
|
||||||
|
.../client/wayland-egl/qwaylandeglwindow_p.h | 6 ++++++
|
||||||
|
2 files changed, 22 insertions(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
|
||||||
|
index e6258893..d020f4db 100644
|
||||||
|
--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
|
||||||
|
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
|
||||||
|
@@ -50,6 +50,15 @@ QWaylandWindow::WindowType QWaylandEglWindow::windowType() const
|
||||||
|
|
||||||
|
void QWaylandEglWindow::ensureSize()
|
||||||
|
{
|
||||||
|
+ // this is always called on the main thread
|
||||||
|
+ QMargins margins = mWindowDecoration ? frameMargins() : QMargins{};
|
||||||
|
+ QRect rect = geometry();
|
||||||
|
+ QSize sizeWithMargins = (rect.size() + QSize(margins.left() + margins.right(), margins.top() + margins.bottom())) * scale();
|
||||||
|
+ {
|
||||||
|
+ QWriteLocker lock(&m_bufferSizeLock);
|
||||||
|
+ m_bufferSize = sizeWithMargins;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
updateSurface(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -60,14 +69,17 @@ void QWaylandEglWindow::setGeometry(const QRect &rect)
|
||||||
|
// we're now getting a resize we don't want to create it again.
|
||||||
|
// Just resize the wl_egl_window, the EGLSurface will be created
|
||||||
|
// the next time makeCurrent is called.
|
||||||
|
- updateSurface(false);
|
||||||
|
+ ensureSize();
|
||||||
|
}
|
||||||
|
|
||||||
|
void QWaylandEglWindow::updateSurface(bool create)
|
||||||
|
{
|
||||||
|
- QMargins margins = mWindowDecoration ? frameMargins() : QMargins{};
|
||||||
|
- QRect rect = geometry();
|
||||||
|
- QSize sizeWithMargins = (rect.size() + QSize(margins.left() + margins.right(), margins.top() + margins.bottom())) * scale();
|
||||||
|
+
|
||||||
|
+ QSize sizeWithMargins;
|
||||||
|
+ {
|
||||||
|
+ QReadLocker lock(&m_bufferSizeLock);
|
||||||
|
+ sizeWithMargins = m_bufferSize;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
// wl_egl_windows must have both width and height > 0
|
||||||
|
// mesa's egl returns NULL if we try to create a, invalid wl_egl_window, however not all EGL
|
||||||
|
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow_p.h b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow_p.h
|
||||||
|
index 5b9aa987..048f0b61 100644
|
||||||
|
--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow_p.h
|
||||||
|
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow_p.h
|
||||||
|
@@ -60,7 +60,13 @@ private:
|
||||||
|
mutable QOpenGLFramebufferObject *m_contentFBO = nullptr;
|
||||||
|
|
||||||
|
QSurfaceFormat m_format;
|
||||||
|
+ // Size used in the last call to wl_egl_window_resize
|
||||||
|
QSize m_requestedSize;
|
||||||
|
+
|
||||||
|
+ // Size of the buffer used by QWaylandWindow
|
||||||
|
+ // This is always written to from the main thread, potentially read from the rendering thread
|
||||||
|
+ QReadWriteLock m_bufferSizeLock;
|
||||||
|
+ QSize m_bufferSize;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.45.2
|
||||||
|
|
@ -1,3 +1,35 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jul 16 09:02:13 UTC 2024 - Fabian Vogt <fvogt@suse.com>
|
||||||
|
|
||||||
|
- Add patches to fix crashes on screens disappearing
|
||||||
|
(kde#489072, kde#489180):
|
||||||
|
* 0001-client-Guard-against-windows-being-on-a-null-screen.patch
|
||||||
|
* 0002-Client-Improve-thread-safety-determining-window-size.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Jul 9 09:20:12 UTC 2024 - Fabian Vogt <fabian@ritter-vogt.de>
|
||||||
|
|
||||||
|
- Add patch to fix certain wayland protocol errors (kde#489259):
|
||||||
|
* 0001-Client-Ensure-that-guessed-popup-parent-has-a-shell-.patch
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Jun 19 07:26:06 UTC 2024 - Christophe Marin <christophe@krop.fr>
|
||||||
|
|
||||||
|
- Update to 6.7.2:
|
||||||
|
* https://www.qt.io/blog/qt-6.7.2-released
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue May 21 08:31:51 UTC 2024 - Christophe Marin <christophe@krop.fr>
|
||||||
|
|
||||||
|
- Update to 6.7.1:
|
||||||
|
* https://www.qt.io/blog/qt-6.7.1-released
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Apr 2 13:40:03 UTC 2024 - Christophe Marin <christophe@krop.fr>
|
||||||
|
|
||||||
|
- Update to 6.7.0:
|
||||||
|
* https://www.qt.io/blog/qt-6.7-released
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Mar 26 14:27:07 UTC 2024 - Christophe Marin <christophe@krop.fr>
|
Tue Mar 26 14:27:07 UTC 2024 - Christophe Marin <christophe@krop.fr>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package qt6-wayland
|
# spec file for package qt6-wayland
|
||||||
#
|
#
|
||||||
# Copyright (c) 2023 SUSE LLC
|
# Copyright (c) 2024 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -16,8 +16,8 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%define real_version 6.6.3
|
%define real_version 6.7.2
|
||||||
%define short_version 6.6
|
%define short_version 6.7
|
||||||
%define tar_name qtwayland-everywhere-src
|
%define tar_name qtwayland-everywhere-src
|
||||||
%define tar_suffix %{nil}
|
%define tar_suffix %{nil}
|
||||||
#
|
#
|
||||||
@ -30,14 +30,19 @@
|
|||||||
%global with_opengl 1
|
%global with_opengl 1
|
||||||
%endif
|
%endif
|
||||||
Name: qt6-wayland%{?pkg_suffix}
|
Name: qt6-wayland%{?pkg_suffix}
|
||||||
Version: 6.6.3
|
Version: 6.7.2
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Qt 6 Wayland libraries and tools
|
Summary: Qt 6 Wayland libraries and tools
|
||||||
# The wayland compositor files are GPL-3.0-or-later
|
# The wayland compositor files are GPL-3.0-or-later
|
||||||
License: GPL-3.0-or-later AND (LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-or-later)
|
License: GPL-3.0-or-later AND (GPL-2.0-only OR LGPL-3.0-only OR GPL-3.0-or-later)
|
||||||
URL: https://www.qt.io
|
URL: https://www.qt.io
|
||||||
Source: https://download.qt.io/official_releases/qt/%{short_version}/%{real_version}%{tar_suffix}/submodules/%{tar_name}-%{real_version}%{tar_suffix}.tar.xz
|
Source0: https://download.qt.io/official_releases/qt/%{short_version}/%{real_version}%{tar_suffix}/submodules/%{tar_name}-%{real_version}%{tar_suffix}.tar.xz
|
||||||
Source99: qt6-wayland-rpmlintrc
|
Source99: qt6-wayland-rpmlintrc
|
||||||
|
# PATCH-FIX-UPSTREAM
|
||||||
|
Patch1: 0001-Client-Ensure-that-guessed-popup-parent-has-a-shell-.patch
|
||||||
|
Patch2: 0001-client-Guard-against-windows-being-on-a-null-screen.patch
|
||||||
|
# https://codereview.qt-project.org/c/qt/qtwayland/+/574983
|
||||||
|
Patch3: 0002-Client-Improve-thread-safety-determining-window-size.patch
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: qt6-core-private-devel
|
BuildRequires: qt6-core-private-devel
|
||||||
BuildRequires: qt6-gui-private-devel
|
BuildRequires: qt6-gui-private-devel
|
||||||
|
BIN
qtwayland-everywhere-src-6.6.3.tar.xz
(Stored with Git LFS)
BIN
qtwayland-everywhere-src-6.6.3.tar.xz
(Stored with Git LFS)
Binary file not shown.
BIN
qtwayland-everywhere-src-6.7.2.tar.xz
(Stored with Git LFS)
Normal file
BIN
qtwayland-everywhere-src-6.7.2.tar.xz
(Stored with Git LFS)
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user