This commit is contained in:
Jan Grulich 2023-01-05 17:03:30 +01:00
parent 46376bb00d
commit 1d0bf7d1b2
62 changed files with 938 additions and 275 deletions

1
.gitignore vendored
View File

@ -15,3 +15,4 @@
/qtwayland-everywhere-opensource-src-5.15.5.tar.xz /qtwayland-everywhere-opensource-src-5.15.5.tar.xz
/qtwayland-everywhere-opensource-src-5.15.6.tar.xz /qtwayland-everywhere-opensource-src-5.15.6.tar.xz
/qtwayland-everywhere-opensource-src-5.15.7.tar.xz /qtwayland-everywhere-opensource-src-5.15.7.tar.xz
/qtwayland-everywhere-opensource-src-5.15.8.tar.xz

View File

@ -1,7 +1,7 @@
From e958ef218835a5ad41908a0017962f8e4a5cacfc Mon Sep 17 00:00:00 2001 From 32471d114c621e3e6c89a4b7090543a8ff47c0a8 Mon Sep 17 00:00:00 2001
From: Vlad Zahorodnii <vlad.zahorodnii@kde.org> From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Date: Wed, 5 May 2021 20:49:26 +0300 Date: Wed, 5 May 2021 20:49:26 +0300
Subject: [PATCH 01/49] Client: Announce an output after receiving more Subject: [PATCH 01/57] Client: Announce an output after receiving more
complete state complete state
Output initialization is not atomic, meaning that the compositor may Output initialization is not atomic, meaning that the compositor may
@ -142,5 +142,5 @@ index df1c94f2..050cfdc0 100644
#if QT_CONFIG(cursor) #if QT_CONFIG(cursor)
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From 80aef0246c3b7cb658f9caca2e1ea3c4b57c0a74 Mon Sep 17 00:00:00 2001 From 4ce9dacc726c61aca80fa283decb2b030bf826db Mon Sep 17 00:00:00 2001
From: Jaeyoon Jung <jaeyoon.jung@lge.com> From: Jaeyoon Jung <jaeyoon.jung@lge.com>
Date: Mon, 15 Feb 2021 08:31:06 +0900 Date: Mon, 15 Feb 2021 08:31:06 +0900
Subject: [PATCH 02/49] Fix issue with repeated window size changes Subject: [PATCH 02/57] Fix issue with repeated window size changes
Check if the new window size is different from the size requested Check if the new window size is different from the size requested
previously before calling wl_egl_window_resize. It addresses the issue previously before calling wl_egl_window_resize. It addresses the issue
@ -54,5 +54,5 @@ index 5b1f4d56..0079dfef 100644
} }
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From e0840ff3d47a3a825a523e4b393ea9f709928d63 Mon Sep 17 00:00:00 2001 From b94794e343a6aacb4eaab3890163d9d9f1755c44 Mon Sep 17 00:00:00 2001
From: David Edmundson <davidedmundson@kde.org> From: David Edmundson <davidedmundson@kde.org>
Date: Tue, 9 Feb 2021 16:09:21 +0000 Date: Tue, 9 Feb 2021 16:09:21 +0000
Subject: [PATCH 03/49] Client: Connect drags being accepted to updating the Subject: [PATCH 03/57] Client: Connect drags being accepted to updating the
source drag icon source drag icon
Currently in a multi-process drag and drop when the other client accepts Currently in a multi-process drag and drop when the other client accepts
@ -35,5 +35,5 @@ index 7e2e3308..bbd2d568 100644
start_drag(m_dragSource->object(), origin->wlSurface(), icon->wlSurface(), m_display->currentInputDevice()->serial()); start_drag(m_dragSource->object(), origin->wlSurface(), icon->wlSurface(), m_display->currentInputDevice()->serial());
return true; return true;
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From 440c43d28b09e257d2244cbdc8fece5ea45405b6 Mon Sep 17 00:00:00 2001 From 53322088f924decda883293a48e165619d309c7f Mon Sep 17 00:00:00 2001
From: David Edmundson <davidedmundson@kde.org> From: David Edmundson <davidedmundson@kde.org>
Date: Fri, 14 May 2021 13:23:24 +0100 Date: Fri, 14 May 2021 13:23:24 +0100
Subject: [PATCH 04/49] Client: Disconnect registry listener on destruction Subject: [PATCH 04/57] Client: Disconnect registry listener on destruction
If a display outlives a QWaylandClientExtension and a new global is If a display outlives a QWaylandClientExtension and a new global is
announced we end up delivering an event to a now deleted extension which announced we end up delivering an event to a now deleted extension which
@ -45,5 +45,5 @@ index 98272e57..5bd28398 100644
QtWaylandClient::QWaylandIntegration *integration() const; QtWaylandClient::QWaylandIntegration *integration() const;
int version() const; int version() const;
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From d26cc08f187d2e5e535372943fff22eea6b4bfc6 Mon Sep 17 00:00:00 2001 From be78c471e94c7f0906318fc21a1509d90bb730aa Mon Sep 17 00:00:00 2001
From: David Edmundson <davidedmundson@kde.org> From: David Edmundson <davidedmundson@kde.org>
Date: Mon, 3 May 2021 23:01:53 +0100 Date: Mon, 3 May 2021 23:01:53 +0100
Subject: [PATCH 05/49] Client: Set XdgShell size hints before the first commit Subject: [PATCH 05/57] Client: Set XdgShell size hints before the first commit
propagateSizeHints is only called in QWindow we have platform window and propagateSizeHints is only called in QWindow we have platform window and
minimumSizeHint is then sent. We also need to send existing hints when minimumSizeHint is then sent. We also need to send existing hints when
@ -20,7 +20,7 @@ Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
2 files changed, 2 insertions(+), 3 deletions(-) 2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
index 3a1569f7..7d33dabd 100644 index f3e3c330..eb317f3a 100644
--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp --- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
+++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp +++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
@@ -105,8 +105,6 @@ void QWaylandXdgSurface::Toplevel::applyConfigure() @@ -105,8 +105,6 @@ void QWaylandXdgSurface::Toplevel::applyConfigure()
@ -54,5 +54,5 @@ index 2277bbb8..2fdd0a7c 100644
QCOMPOSITOR_TRY_COMPARE(xdgToplevel()->m_committed.minSize, QSize(100, 100)); QCOMPOSITOR_TRY_COMPARE(xdgToplevel()->m_committed.minSize, QSize(100, 100));
QCOMPOSITOR_TRY_COMPARE(xdgToplevel()->m_committed.maxSize, QSize(1000, 1000)); QCOMPOSITOR_TRY_COMPARE(xdgToplevel()->m_committed.maxSize, QSize(1000, 1000));
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From 926a7fa0be1732384116b907999032536931f389 Mon Sep 17 00:00:00 2001 From d9479064ef2e669cb79c200ee1db7e4f5e145f1f Mon Sep 17 00:00:00 2001
From: David Edmundson <davidedmundson@kde.org> From: David Edmundson <davidedmundson@kde.org>
Date: Mon, 14 Jun 2021 12:45:37 +0100 Date: Mon, 14 Jun 2021 12:45:37 +0100
Subject: [PATCH 06/49] Fix build Subject: [PATCH 06/57] Fix build
1b5e43a593e917610e6245f7a272ac081c508ba4 relied on a patch that we can't 1b5e43a593e917610e6245f7a272ac081c508ba4 relied on a patch that we can't
backport. backport.
@ -42,5 +42,5 @@ index 69cc46a0..9091efbe 100644
class Q_WAYLAND_CLIENT_EXPORT QWaylandClientExtensionTemplatePrivate : public QWaylandClientExtensionPrivate class Q_WAYLAND_CLIENT_EXPORT QWaylandClientExtensionTemplatePrivate : public QWaylandClientExtensionPrivate
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From 43255b532e8fb93edab0b851341c12218cba03d4 Mon Sep 17 00:00:00 2001 From f1e0f3caca97331b02782c4a367366078ba36b4d Mon Sep 17 00:00:00 2001
From: Zhang Liang <zhanglianga@uniontech.com> From: Zhang Liang <zhanglianga@uniontech.com>
Date: Mon, 1 Feb 2021 19:29:43 +0800 Date: Mon, 1 Feb 2021 19:29:43 +0800
Subject: [PATCH 07/49] Fix: remove listener Subject: [PATCH 07/57] Fix: remove listener
Add the operation for removing the listener form listener list Add the operation for removing the listener form listener list
@ -29,5 +29,5 @@ index f10c1f79..e0dfe8b2 100644
uint32_t QWaylandDisplay::currentTimeMillisec() uint32_t QWaylandDisplay::currentTimeMillisec()
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From d58b2a2ff81e3ee0c6888ce7eb7268603d4e72d4 Mon Sep 17 00:00:00 2001 From 5fe9ca3aad86b82a2c43b33491605e53227cefad Mon Sep 17 00:00:00 2001
From: David Redondo <qt@david-redondo.de> From: David Redondo <qt@david-redondo.de>
Date: Wed, 26 May 2021 14:49:40 +0200 Date: Wed, 26 May 2021 14:49:40 +0200
Subject: [PATCH 08/49] Hook up queryKeyboardModifers Subject: [PATCH 08/57] Hook up queryKeyboardModifers
Can be useful when upon enter a modifiers event is received but no key Can be useful when upon enter a modifiers event is received but no key
event so no QKeyEvent is generated. event so no QKeyEvent is generated.
@ -51,5 +51,5 @@ index ff70ae25..73b80658 100644
QStringList themeNames() const override; QStringList themeNames() const override;
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From c32409b20dc9cf90a43f5319cc771c4a41ba0637 Mon Sep 17 00:00:00 2001 From c903b6486550f3dbbb8d4dc3ddd81aa60cc505fe Mon Sep 17 00:00:00 2001
From: Jan Blackquill <uhhadd@gmail.com> From: Jan Blackquill <uhhadd@gmail.com>
Date: Tue, 24 Aug 2021 14:36:34 -0400 Date: Tue, 24 Aug 2021 14:36:34 -0400
Subject: [PATCH 09/49] Correctly detect if image format is supported by Subject: [PATCH 09/57] Correctly detect if image format is supported by
QImageWriter QImageWriter
The code queries potential image formats by stripping a mimetype of its The code queries potential image formats by stripping a mimetype of its
@ -64,5 +64,5 @@ index a5fdd34d..051a91dc 100644
fmt = imgFmt; fmt = imgFmt;
} }
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From 493f0931e08d4d0722614b8b88dda598a6dbb8ea Mon Sep 17 00:00:00 2001 From f1c68a200d48545dee0e266a55953e5ddac475f5 Mon Sep 17 00:00:00 2001
From: Georges Basile Stavracas Neto <gbsneto@gnome.org> From: Georges Basile Stavracas Neto <gbsneto@gnome.org>
Date: Thu, 27 May 2021 19:55:04 -0300 Date: Thu, 27 May 2021 19:55:04 -0300
Subject: [PATCH 10/49] Client: Don't always recreate frame callbacks Subject: [PATCH 10/57] Client: Don't always recreate frame callbacks
The main QWaylandWindow method that is executed when handling updates is The main QWaylandWindow method that is executed when handling updates is
QWaylandWindow::handleUpdate(). This method always, unconditionally queues QWaylandWindow::handleUpdate(). This method always, unconditionally queues
@ -38,7 +38,7 @@ Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2 files changed, 6 insertions(+) 2 files changed, 6 insertions(+)
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index afdebf55..14254f08 100644 index cb82857a..f13018be 100644
--- a/src/client/qwaylandwindow.cpp --- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp
@@ -1185,6 +1185,10 @@ void QWaylandWindow::requestUpdate() @@ -1185,6 +1185,10 @@ void QWaylandWindow::requestUpdate()
@ -73,5 +73,5 @@ index 2fdd0a7c..e2593314 100644
void tst_xdgshell::popup() void tst_xdgshell::popup()
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From b1b6e096ac2b5f00c71b247c034138298655f7fc Mon Sep 17 00:00:00 2001 From a3fcf0c111a96f3dd69ae51366fe7e167d7bac31 Mon Sep 17 00:00:00 2001
From: Georges Basile Stavracas Neto <gbsneto@gnome.org> From: Georges Basile Stavracas Neto <gbsneto@gnome.org>
Date: Thu, 27 May 2021 20:02:53 -0300 Date: Thu, 27 May 2021 20:02:53 -0300
Subject: [PATCH 11/49] Client: Always destroy frame callback in the actual Subject: [PATCH 11/57] Client: Always destroy frame callback in the actual
callback callback
It's good hygiene to destroy all frame callbacks. Destroy the It's good hygiene to destroy all frame callbacks. Destroy the
@ -23,7 +23,7 @@ Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
1 file changed, 5 insertions(+), 6 deletions(-) 1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index 14254f08..afef6c0b 100644 index f13018be..4544dcec 100644
--- a/src/client/qwaylandwindow.cpp --- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp
@@ -635,9 +635,13 @@ void QWaylandWindow::commit() @@ -635,9 +635,13 @@ void QWaylandWindow::commit()
@ -54,5 +54,5 @@ index 14254f08..afef6c0b 100644
struct ::wl_surface *wrappedSurface = reinterpret_cast<struct ::wl_surface *>(wl_proxy_create_wrapper(mSurface->object())); struct ::wl_surface *wrappedSurface = reinterpret_cast<struct ::wl_surface *>(wl_proxy_create_wrapper(mSurface->object()));
wl_proxy_set_queue(reinterpret_cast<wl_proxy *>(wrappedSurface), mFrameQueue.queue); wl_proxy_set_queue(reinterpret_cast<wl_proxy *>(wrappedSurface), mFrameQueue.queue);
-- --
2.37.3 2.39.0

View File

@ -1,40 +0,0 @@
From 4d79df48948fc109e7db8f55c16807b6f6440e13 Mon Sep 17 00:00:00 2001
From: Rodney Dawes <dobey.pwns@gmail.com>
Date: Fri, 15 Oct 2021 12:55:33 -0400
Subject: [PATCH 12/49] Fix the logic for decoding modifiers map in Wayland
text input protocol
Correctly check for the flags in the modifiers map when we get it from
the compositor, instead of modifying the map in the for loop conditional.
[ChangeLog][QWaylandInputContext] Fix modifiers map decoding
logic when receiving the map from the compositor.
Fixes: QTBUG-97094
Pick-to: 6.2 5.15 5.12
Change-Id: Idad19f7b1f4560d40abbb5b31032360cfe915261
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
---
src/client/qwaylandinputcontext.cpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/client/qwaylandinputcontext.cpp b/src/client/qwaylandinputcontext.cpp
index 8b79c08f..84a34674 100644
--- a/src/client/qwaylandinputcontext.cpp
+++ b/src/client/qwaylandinputcontext.cpp
@@ -387,8 +387,10 @@ void QWaylandTextInput::zwp_text_input_v2_input_method_changed(uint32_t serial,
Qt::KeyboardModifiers QWaylandTextInput::modifiersToQtModifiers(uint32_t modifiers)
{
Qt::KeyboardModifiers ret = Qt::NoModifier;
- for (int i = 0; modifiers >>= 1; ++i) {
- ret |= m_modifiersMap[i];
+ for (int i = 0; i < m_modifiersMap.size(); ++i) {
+ if (modifiers & (1 << i)) {
+ ret |= m_modifiersMap[i];
+ }
}
return ret;
}
--
2.37.3

View File

@ -1,7 +1,7 @@
From e532733f7f4406d6b656c12cd107736dacd570e7 Mon Sep 17 00:00:00 2001 From 2cee3d23545333b16c185c36769e4be05660efe7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?M=C3=A9ven=20Car?= <meven.car@enioka.com> From: =?UTF-8?q?M=C3=A9ven=20Car?= <meven.car@enioka.com>
Date: Wed, 18 Aug 2021 18:28:20 +0200 Date: Wed, 18 Aug 2021 18:28:20 +0200
Subject: [PATCH 13/49] Wayland client: use wl_keyboard to determine active Subject: [PATCH 12/57] Wayland client: use wl_keyboard to determine active
state state
Commit f497a5bb87270174b8e0106b7eca1992d44ff15d made QWaylandDisplay Commit f497a5bb87270174b8e0106b7eca1992d44ff15d made QWaylandDisplay
@ -95,7 +95,7 @@ index 3b092bc8..09a1736a 100644
void blockingReadEvents(); void blockingReadEvents();
void flushRequests(); void flushRequests();
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index afef6c0b..a14d8705 100644 index 4544dcec..0b64b0f4 100644
--- a/src/client/qwaylandwindow.cpp --- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp
@@ -96,7 +96,6 @@ QWaylandWindow::QWaylandWindow(QWindow *window, QWaylandDisplay *display) @@ -96,7 +96,6 @@ QWaylandWindow::QWaylandWindow(QWindow *window, QWaylandDisplay *display)
@ -234,7 +234,7 @@ index 261f8cbb..c1bcd5c6 100644
private: private:
QScopedPointer<QWaylandXdgShellV6> m_xdgShell; QScopedPointer<QWaylandXdgShellV6> m_xdgShell;
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
index 7d33dabd..d7d0ddf7 100644 index eb317f3a..11706924 100644
--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp --- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
+++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp +++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
@@ -67,11 +67,6 @@ QWaylandXdgSurface::Toplevel::Toplevel(QWaylandXdgSurface *xdgSurface) @@ -67,11 +67,6 @@ QWaylandXdgSurface::Toplevel::Toplevel(QWaylandXdgSurface *xdgSurface)
@ -337,5 +337,5 @@ index e2593314..73d1eb9c 100644
const QSize screenSize(640, 480); const QSize screenSize(640, 480);
const uint maximizedSerial = exec([=] { const uint maximizedSerial = exec([=] {
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From cdee89135492a9fb0f042bef55960ea1b3f9edeb Mon Sep 17 00:00:00 2001 From b1b87bf639d46605d63e07eecd1135d9e5e4ffac Mon Sep 17 00:00:00 2001
From: Jan Grulich <jgrulich@redhat.com> From: Jan Grulich <jgrulich@redhat.com>
Date: Fri, 16 Jul 2021 13:00:03 +0200 Date: Fri, 16 Jul 2021 13:00:03 +0200
Subject: [PATCH 14/49] Client: do not empty clipboard when a new popup/window Subject: [PATCH 13/57] Client: do not empty clipboard when a new popup/window
is opened is opened
If we open a new popup or a window within the same app we have to avoid If we open a new popup or a window within the same app we have to avoid
@ -64,5 +64,5 @@ index 613fe862..aaec7eb8 100644
mRepeatTimer.stop(); mRepeatTimer.stop();
} }
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From 61690b979ed6585707904f3e490a8d417f209890 Mon Sep 17 00:00:00 2001 From 4a7cf632c3d1a5ad66e724b0de85342654ba4760 Mon Sep 17 00:00:00 2001
From: Weng Xuetian <wengxt@gmail.com> From: Weng Xuetian <wengxt@gmail.com>
Date: Sat, 18 Dec 2021 23:42:49 -0800 Date: Sat, 18 Dec 2021 23:42:49 -0800
Subject: [PATCH 15/49] Set preedit cursor when cursor equals to 0 Subject: [PATCH 14/57] Set preedit cursor when cursor equals to 0
Pick-to: 6.3 6.2 5.15 Pick-to: 6.3 6.2 5.15
Change-Id: I832fbb22d973b36ac4ab51570fc53bc2e4c3ed58 Change-Id: I832fbb22d973b36ac4ab51570fc53bc2e4c3ed58
@ -25,5 +25,5 @@ index 526d0ef4..25be2509 100644
} else if (m_preeditCursor > 0) { } else if (m_preeditCursor > 0) {
attributes.append(QInputMethodEvent::Attribute(QInputMethodEvent::Cursor, indexFromWayland(text, m_preeditCursor), 1, QVariant())); attributes.append(QInputMethodEvent::Attribute(QInputMethodEvent::Cursor, indexFromWayland(text, m_preeditCursor), 1, QVariant()));
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From 239325e37c79acb9c2d32561d0dba70bece1a064 Mon Sep 17 00:00:00 2001 From 3eaa09ead7750e9a484d0f4dc44d60ee48e54cdd Mon Sep 17 00:00:00 2001
From: David Edmundson <davidedmundson@kde.org> From: David Edmundson <davidedmundson@kde.org>
Date: Tue, 16 Feb 2021 09:51:47 +0000 Date: Tue, 16 Feb 2021 09:51:47 +0000
Subject: [PATCH 16/49] Client: Implement DataDeviceV3 Subject: [PATCH 15/57] Client: Implement DataDeviceV3
DataDeviceV2 fixes a leak of DataDevice resources. DataDeviceV2 fixes a leak of DataDevice resources.
@ -509,5 +509,5 @@ index 1568b3b9..067410d0 100644
class DataDeviceCompositor : public DefaultCompositor { class DataDeviceCompositor : public DefaultCompositor {
public: public:
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From 74024e1b628db9988537aaa5311b012de663f03e Mon Sep 17 00:00:00 2001 From 072a3e85068c74cb63fd66bc9dcf7b0b5757a30b Mon Sep 17 00:00:00 2001
From: Arjen Hiemstra <ahiemstra@heimr.nl> From: Arjen Hiemstra <ahiemstra@heimr.nl>
Date: Thu, 18 Nov 2021 13:05:30 +0100 Date: Thu, 18 Nov 2021 13:05:30 +0100
Subject: [PATCH 17/49] Client: Delay deletion of QDrag object until after Subject: [PATCH 16/57] Client: Delay deletion of QDrag object until after
we're done with it we're done with it
In certain cases, most notably when performing drag and drop operations In certain cases, most notably when performing drag and drop operations
@ -63,5 +63,5 @@ index 747f0190..46f629ac 100644
private: private:
QWaylandDisplay *m_display = nullptr; QWaylandDisplay *m_display = nullptr;
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From 7ca997dab774193653ae40a39c2d5a78a5389880 Mon Sep 17 00:00:00 2001 From b61579e7185d4f64ef896ec609428afe81e586e1 Mon Sep 17 00:00:00 2001
From: David Edmundson <davidedmundson@kde.org> From: David Edmundson <davidedmundson@kde.org>
Date: Sun, 14 Nov 2021 13:54:19 +0000 Date: Sun, 14 Nov 2021 13:54:19 +0000
Subject: [PATCH 18/49] Client: Avoid processing of events when showing windows Subject: [PATCH 17/57] Client: Avoid processing of events when showing windows
The only time we want to dispatch events from the wayland socket is when The only time we want to dispatch events from the wayland socket is when
the application is waiting for external events. Doing so at any other the application is waiting for external events. Doing so at any other
@ -22,7 +22,7 @@ Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
1 file changed, 1 deletion(-) 1 file changed, 1 deletion(-)
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index a14d8705..33c5b9d3 100644 index 0b64b0f4..cc425818 100644
--- a/src/client/qwaylandwindow.cpp --- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp
@@ -437,7 +437,6 @@ void QWaylandWindow::setVisible(bool visible) @@ -437,7 +437,6 @@ void QWaylandWindow::setVisible(bool visible)
@ -34,5 +34,5 @@ index a14d8705..33c5b9d3 100644
setGeometry(windowGeometry()); setGeometry(windowGeometry());
// Don't flush the events here, or else the newly visible window may start drawing, but since // Don't flush the events here, or else the newly visible window may start drawing, but since
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From f550dc5061cd58099788ec2602212c342aa5d3de Mon Sep 17 00:00:00 2001 From a68649f3a3f04b14238be9f327c5132da1f9fe27 Mon Sep 17 00:00:00 2001
From: Elvis Lee <kwangwoong.lee@lge.com> From: Elvis Lee <kwangwoong.lee@lge.com>
Date: Thu, 18 Feb 2021 15:45:49 +0900 Date: Thu, 18 Feb 2021 15:45:49 +0900
Subject: [PATCH 19/49] Handle registry_global out of constructor Subject: [PATCH 18/57] Handle registry_global out of constructor
Factory functions in QWaylandDisplay::registry_global() can be overridden. Factory functions in QWaylandDisplay::registry_global() can be overridden.
Later, other classes instantiated in the registry_global can support Later, other classes instantiated in the registry_global can support
@ -81,5 +81,5 @@ index e5e7dd42..f5632982 100644
mDisplay->ensureScreen(); mDisplay->ensureScreen();
} }
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From d837b730d4658849dcf9db7a9bad4fc0c68c7853 Mon Sep 17 00:00:00 2001 From 848a4c047577d4800a03da2cb98e305702b220ae Mon Sep 17 00:00:00 2001
From: Elvis Lee <kwangwoong.lee@lge.com> From: Elvis Lee <kwangwoong.lee@lge.com>
Date: Wed, 17 Mar 2021 16:31:10 +0900 Date: Wed, 17 Mar 2021 16:31:10 +0900
Subject: [PATCH 20/49] Connect flushRequest after forceRoundTrip Subject: [PATCH 19/57] Connect flushRequest after forceRoundTrip
If flushRequest is connected with aboutToBlock, the flushRequest If flushRequest is connected with aboutToBlock, the flushRequest
may consumes all events so that processEvents might be blocked in forceRoundTrip. may consumes all events so that processEvents might be blocked in forceRoundTrip.
@ -43,5 +43,5 @@ index f5632982..3a6fa651 100644
mDisplay->ensureScreen(); mDisplay->ensureScreen();
} }
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From 142e7c9be808a35832e0f48e0557b6bcf6aaba23 Mon Sep 17 00:00:00 2001 From 920bdf21327c447e11a1edb8e75b153800025732 Mon Sep 17 00:00:00 2001
From: Adrien Faveraux <af@brain-networks.fr> From: Adrien Faveraux <af@brain-networks.fr>
Date: Fri, 26 Nov 2021 09:18:58 +0100 Date: Fri, 26 Nov 2021 09:18:58 +0100
Subject: [PATCH 21/49] Move the wayland socket polling to a separate event Subject: [PATCH 20/57] Move the wayland socket polling to a separate event
thread thread
New event threads is introduced which calls poll() on the wayland fd, New event threads is introduced which calls poll() on the wayland fd,
@ -458,7 +458,7 @@ index 3a6fa651..3b876047 100644
// Call after eventDispatcher is fully connected, for QWaylandDisplay::forceRoundTrip() // Call after eventDispatcher is fully connected, for QWaylandDisplay::forceRoundTrip()
mDisplay->initialize(); mDisplay->initialize();
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index 33c5b9d3..2c4ffb56 100644 index cc425818..13976320 100644
--- a/src/client/qwaylandwindow.cpp --- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp
@@ -76,7 +76,6 @@ QWaylandWindow *QWaylandWindow::mMouseGrab = nullptr; @@ -76,7 +76,6 @@ QWaylandWindow *QWaylandWindow::mMouseGrab = nullptr;
@ -570,5 +570,5 @@ index fb3ed606..54ac67a9 100644
// True when we have called deliverRequestUpdate, but the client has not yet attached a new buffer // True when we have called deliverRequestUpdate, but the client has not yet attached a new buffer
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From b763109be9e43a74081bd2751a0bf5ddf946bd33 Mon Sep 17 00:00:00 2001 From 4a1969067ed737c3fa659242cf7e806cd86982e0 Mon Sep 17 00:00:00 2001
From: Joni Poikelin <joni.poikelin@qt.io> From: Joni Poikelin <joni.poikelin@qt.io>
Date: Thu, 3 Feb 2022 14:01:50 +0200 Date: Thu, 3 Feb 2022 14:01:50 +0200
Subject: [PATCH 23/49] Fix crash if no input method module could be loaded Subject: [PATCH 21/57] Fix crash if no input method module could be loaded
Pick-to: 6.2 6.3 5.15 Pick-to: 6.2 6.3 5.15
Change-Id: I8f346def616606a6c5540856bd08a84ee7ed5ca2 Change-Id: I8f346def616606a6c5540856bd08a84ee7ed5ca2
@ -25,5 +25,5 @@ index 3b876047..fbf00c6b 100644
QWaylandShellIntegration *QWaylandIntegration::createShellIntegration(const QString &integrationName) QWaylandShellIntegration *QWaylandIntegration::createShellIntegration(const QString &integrationName)
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From 78693107da90f5d9062ef2fa83175a6ca2b2c90e Mon Sep 17 00:00:00 2001 From 0aaf113e480900740f8c7e6ebd7acb1ea28cf40e Mon Sep 17 00:00:00 2001
From: Vlad Zahorodnii <vlad.zahorodnii@kde.org> From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Date: Tue, 1 Feb 2022 13:05:36 +0200 Date: Tue, 1 Feb 2022 13:05:36 +0200
Subject: [PATCH 24/49] Client: Remove mWaitingForUpdateDelivery Subject: [PATCH 22/57] Client: Remove mWaitingForUpdateDelivery
Currently, mWaitingForUpdateDelivery is shared between the main thread Currently, mWaitingForUpdateDelivery is shared between the main thread
(doHandleFrameCallback()) and the frame callback event thread (doHandleFrameCallback()) and the frame callback event thread
@ -75,5 +75,5 @@ index 54ac67a9..cf7ce879 100644
QElapsedTimer mFrameCallbackElapsedTimer; QElapsedTimer mFrameCallbackElapsedTimer;
struct ::wl_callback *mFrameCallback = nullptr; struct ::wl_callback *mFrameCallback = nullptr;
-- --
2.37.3 2.39.0

View File

@ -1,39 +0,0 @@
From eda84d33e7905c4ef44a2c9f6fdd333eb7ed2327 Mon Sep 17 00:00:00 2001
From: Inho Lee <inho.lee@qt.io>
Date: Mon, 1 Nov 2021 14:23:58 +0100
Subject: [PATCH 22/49] Do not create decorations when the shellSurface is not
ready
A cases reported that client windows try to make decorations
when their shell surfaces are null.
Since the surfaces' requests for decorations should be applied,
those case will be failed to create decorations.
This patch was modified by Paul Tvete's advice.
(paul.tvete@qt.io)
Pick-to: 6.2 5.15
Task-number: QTBUG-97608
Change-Id: I2563dbd73b730f81cc411857af07da99ceb2d063
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
(cherry picked from commit 246f0c0bc01dd059bf8165e81f7b49efa36e4d95)
---
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 2c4ffb56..13976320 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -828,7 +828,7 @@ bool QWaylandWindow::createDecoration()
decoration = false;
if (mSubSurfaceWindow)
decoration = false;
- if (mShellSurface && !mShellSurface->wantsDecorations())
+ if (!mShellSurface || !mShellSurface->wantsDecorations())
decoration = false;
bool hadDecoration = mWindowDecoration;
--
2.37.3

View File

@ -1,7 +1,7 @@
From 54ceb678e383b0da9619be0a75982f3afb244ac0 Mon Sep 17 00:00:00 2001 From b5ee817f9d1597d6cffb82ec2638d2259e6b1a5a Mon Sep 17 00:00:00 2001
From: Weng Xuetian <wengxt@gmail.com> From: Weng Xuetian <wengxt@gmail.com>
Date: Tue, 8 Feb 2022 07:11:25 -0800 Date: Tue, 8 Feb 2022 07:11:25 -0800
Subject: [PATCH 25/49] Cursor position == 0 should still show the cursor Subject: [PATCH 23/57] Cursor position == 0 should still show the cursor
Otherwise the cursor would be hidden even if preedit is empty. Otherwise the cursor would be hidden even if preedit is empty.
Amends 719a55be13bdadfa659a732755f280e276a894bd Amends 719a55be13bdadfa659a732755f280e276a894bd
@ -31,5 +31,5 @@ index 25be2509..458d818e 100644
} }
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From f5a41e6908368e4743c2b1227c64fb58edee4d42 Mon Sep 17 00:00:00 2001 From b7cf29e74784f5138a0182f733fe31960debf7be Mon Sep 17 00:00:00 2001
From: Weng Xuetian <wengxt@gmail.com> From: Weng Xuetian <wengxt@gmail.com>
Date: Wed, 22 Dec 2021 10:42:38 -0800 Date: Wed, 22 Dec 2021 10:42:38 -0800
Subject: [PATCH 26/49] Update the preedit styling mapping Subject: [PATCH 24/57] Update the preedit styling mapping
- None mapping to no style. - None mapping to no style.
- Default/Underline mapping to underline. - Default/Underline mapping to underline.
@ -84,5 +84,5 @@ index 458d818e..f50ccf30 100644
break; break;
} }
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From fd149e386037252ef5aef2b82ba0f61df4aa9316 Mon Sep 17 00:00:00 2001 From 7b07d715203182c1f04ad450011a7e3623d1e8e8 Mon Sep 17 00:00:00 2001
From: David Edmundson <davidedmundson@kde.org> From: David Edmundson <davidedmundson@kde.org>
Date: Wed, 9 Feb 2022 17:20:48 +0000 Date: Wed, 9 Feb 2022 17:20:48 +0000
Subject: [PATCH 27/49] client: Simplify round trip behavior Subject: [PATCH 25/57] client: Simplify round trip behavior
The custom event queue was removed in The custom event queue was removed in
302d4ffb8549214eb4028dc3e47ec4ee4e12ffbd (2015) so the comment about not 302d4ffb8549214eb4028dc3e47ec4ee4e12ffbd (2015) so the comment about not
@ -78,5 +78,5 @@ index a7ce280a..41a44e4b 100644
bool QWaylandDisplay::supportsWindowDecoration() const bool QWaylandDisplay::supportsWindowDecoration() const
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From 4a041c982573e822b111d704f53969d170f2552c Mon Sep 17 00:00:00 2001 From 2c71ea7f92616c799f12a342807688f6854beb4d Mon Sep 17 00:00:00 2001
From: Vlad Zahorodnii <vlad.zahorodnii@kde.org> From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Date: Sat, 19 Feb 2022 17:01:04 +0200 Date: Sat, 19 Feb 2022 17:01:04 +0200
Subject: [PATCH 28/49] Client: Fix opaque region setter Subject: [PATCH 26/57] Client: Fix opaque region setter
The rect is in the global coordinate system, while the opaque region The rect is in the global coordinate system, while the opaque region
must be in the surface local coordinate system. must be in the surface local coordinate system.
@ -27,5 +27,5 @@ index 579a762a..694e98a4 100644
void QWaylandWindow::resizeFromApplyConfigure(const QSize &sizeWithMargins, const QPoint &offset) void QWaylandWindow::resizeFromApplyConfigure(const QSize &sizeWithMargins, const QPoint &offset)
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From db5eb7da124460480a99f7dc17d0e44586636479 Mon Sep 17 00:00:00 2001 From 20af00d0fb9da337d16b6d464ade52de39d39bf0 Mon Sep 17 00:00:00 2001
From: Fabian Vogt <fabian@ritter-vogt.de> From: Fabian Vogt <fabian@ritter-vogt.de>
Date: Fri, 4 Feb 2022 11:07:36 +0100 Date: Fri, 4 Feb 2022 11:07:36 +0100
Subject: [PATCH 29/49] Use proper dependencies in compile tests Subject: [PATCH 27/57] Use proper dependencies in compile tests
Use the dependencies as found by the "libraries" section instead of relying Use the dependencies as found by the "libraries" section instead of relying
on them being available in the default location (e.g. "-ldrm"). on them being available in the default location (e.g. "-ldrm").
@ -122,5 +122,5 @@ index bcfd5215..da95d07b 100644
}, },
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From b05feed6fcd47c81a522262236ee1afa1862904c Mon Sep 17 00:00:00 2001 From a947fd6ffe37524e81936c84f264da9c50b009a8 Mon Sep 17 00:00:00 2001
From: Liang Qi <liang.qi@qt.io> From: Liang Qi <liang.qi@qt.io>
Date: Wed, 9 Mar 2022 10:47:42 +0100 Date: Wed, 9 Mar 2022 10:47:42 +0100
Subject: [PATCH 30/49] client: update button state and etc in pointer_leave() Subject: [PATCH 28/57] client: update button state and etc in pointer_leave()
The cleanup work needs to be done even the surface is null, for The cleanup work needs to be done even the surface is null, for
example, a window was closed in mouse press handler, then will not example, a window was closed in mouse press handler, then will not
@ -46,5 +46,5 @@ index aaec7eb8..c3cc4eca 100644
class MotionEvent : public QWaylandPointerEvent class MotionEvent : public QWaylandPointerEvent
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From d9f268ae17e07588da7c7a2fc10a5448369ef0b9 Mon Sep 17 00:00:00 2001 From 041325c228861093d4325927e4f5e535c9410d1f Mon Sep 17 00:00:00 2001
From: Paul Olav Tvete <paul.tvete@qt.io> From: Paul Olav Tvete <paul.tvete@qt.io>
Date: Tue, 15 Mar 2022 15:59:15 +0100 Date: Tue, 15 Mar 2022 15:59:15 +0100
Subject: [PATCH 31/49] Revert "Client: Remove mWaitingForUpdateDelivery" Subject: [PATCH 29/57] Revert "Client: Remove mWaitingForUpdateDelivery"
The reverted commit introduces a severe performance regression The reverted commit introduces a severe performance regression
when a client window is resized while a QtQuick renderthread when a client window is resized while a QtQuick renderthread
@ -55,5 +55,5 @@ index cf7ce879..54ac67a9 100644
QElapsedTimer mFrameCallbackElapsedTimer; QElapsedTimer mFrameCallbackElapsedTimer;
struct ::wl_callback *mFrameCallback = nullptr; struct ::wl_callback *mFrameCallback = nullptr;
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From 72bc145365397e4b033d479516e9a4a3c30ab276 Mon Sep 17 00:00:00 2001 From 2c108beef333a46caf80db9decff43083aaaa099 Mon Sep 17 00:00:00 2001
From: Paul Olav Tvete <paul.tvete@qt.io> From: Paul Olav Tvete <paul.tvete@qt.io>
Date: Tue, 15 Mar 2022 16:53:04 +0100 Date: Tue, 15 Mar 2022 16:53:04 +0100
Subject: [PATCH 32/49] Fix race condition on mWaitingForUpdateDelivery Subject: [PATCH 30/57] Fix race condition on mWaitingForUpdateDelivery
Change-Id: I0e91bda73722468b9339fc434fe04420b5e7d3da Change-Id: I0e91bda73722468b9339fc434fe04420b5e7d3da
Reviewed-by: David Edmundson <davidedmundson@kde.org> Reviewed-by: David Edmundson <davidedmundson@kde.org>
@ -55,5 +55,5 @@ index 54ac67a9..c0a76345 100644
QElapsedTimer mFrameCallbackElapsedTimer; QElapsedTimer mFrameCallbackElapsedTimer;
struct ::wl_callback *mFrameCallback = nullptr; struct ::wl_callback *mFrameCallback = nullptr;
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From 47bd24aa3ba58f2abb520ff5bded38c1a3de101e Mon Sep 17 00:00:00 2001 From 78ea1a157dde5246b0b53e80d61bb7929aff9616 Mon Sep 17 00:00:00 2001
From: Kenneth Topp <ken@bllue.org> From: Kenneth Topp <ken@bllue.org>
Date: Mon, 4 Apr 2022 09:36:21 -0400 Date: Mon, 4 Apr 2022 09:36:21 -0400
Subject: [PATCH 33/49] use poll(2) when reading from clipboard Subject: [PATCH 31/57] use poll(2) when reading from clipboard
change clipboard read away from select(2) call which can fail when change clipboard read away from select(2) call which can fail when
an application has large number of open files an application has large number of open files
@ -44,5 +44,5 @@ index c9e158cc..fe0ea8c9 100644
} else if (ready == 0) { } else if (ready == 0) {
qWarning("QWaylandDataOffer: timeout reading from pipe"); qWarning("QWaylandDataOffer: timeout reading from pipe");
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From b1a11fe937fc91aa9784df31253637dbad8ae97b Mon Sep 17 00:00:00 2001 From 55fc0727534575897a866f4b89295dfc38652434 Mon Sep 17 00:00:00 2001
From: Ulf Hermann <ulf.hermann@qt.io> From: Ulf Hermann <ulf.hermann@qt.io>
Date: Tue, 22 Feb 2022 12:31:08 +0100 Date: Tue, 22 Feb 2022 12:31:08 +0100
Subject: [PATCH 34/49] Reduce memory leakage Subject: [PATCH 32/57] Reduce memory leakage
We need to clean up the event queue when we're done. We need to clean up the event queue when we're done.
@ -27,5 +27,5 @@ index 41a44e4b..622ffe41 100644
// Steps which is called just after constructor. This separates registry_global() out of the constructor // Steps which is called just after constructor. This separates registry_global() out of the constructor
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From e30016b35b77e37baced365a072a23b3d04964f7 Mon Sep 17 00:00:00 2001 From 5b78d5157803414733133ca22490117a1f1a881b Mon Sep 17 00:00:00 2001
From: Sam James <sam@gentoo.org> From: Sam James <sam@gentoo.org>
Date: Sat, 18 Jun 2022 17:11:11 +0100 Date: Sat, 18 Jun 2022 17:11:11 +0100
Subject: [PATCH 35/49] Fix build with libcxx (missing array include) Subject: [PATCH 33/57] Fix build with libcxx (missing array include)
Bug: https://bugs.gentoo.org/833488 Bug: https://bugs.gentoo.org/833488
@ -28,5 +28,5 @@ index 56a710c3..c6a8b6c6 100644
#include <EGL/eglext.h> #include <EGL/eglext.h>
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From 8ac781b098343fdc941b3fc7509319fbfefe95c8 Mon Sep 17 00:00:00 2001 From 81ddf70997f62d5f1a02d89048c5ec2d3cd27eaf Mon Sep 17 00:00:00 2001
From: Weng Xuetian <wengxt@gmail.com> From: Weng Xuetian <wengxt@gmail.com>
Date: Wed, 20 Jul 2022 15:57:40 -0700 Date: Wed, 20 Jul 2022 15:57:40 -0700
Subject: [PATCH 36/49] Only close popup in the the hierchary Subject: [PATCH 34/57] Only close popup in the the hierchary
Imagine following event sequences: Imagine following event sequences:
1. a tooltip is shown. activePopups = {tooltip} 1. a tooltip is shown. activePopups = {tooltip}
@ -209,7 +209,7 @@ index 8c371661..151c78e3 100644
auto *shell = m_xdgSurface->m_shell; auto *shell = m_xdgSurface->m_shell;
Q_ASSERT(shell->m_topmostGrabbingPopup == this); Q_ASSERT(shell->m_topmostGrabbingPopup == this);
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
index d7d0ddf7..3999a5ee 100644 index 11706924..25c0e8c3 100644
--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp --- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
+++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp +++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
@@ -195,12 +195,17 @@ QtWayland::xdg_toplevel::resize_edge QWaylandXdgSurface::Toplevel::convertToResi @@ -195,12 +195,17 @@ QtWayland::xdg_toplevel::resize_edge QWaylandXdgSurface::Toplevel::convertToResi
@ -249,7 +249,7 @@ index d7d0ddf7..3999a5ee 100644
} }
} }
@@ -392,8 +401,6 @@ void QWaylandXdgSurface::setPopup(QWaylandWindow *parent) @@ -393,8 +402,6 @@ void QWaylandXdgSurface::setPopup(QWaylandWindow *parent)
{ {
Q_ASSERT(!m_toplevel && !m_popup); Q_ASSERT(!m_toplevel && !m_popup);
@ -258,7 +258,7 @@ index d7d0ddf7..3999a5ee 100644
auto positioner = new QtWayland::xdg_positioner(m_shell->create_positioner()); auto positioner = new QtWayland::xdg_positioner(m_shell->create_positioner());
// set_popup expects a position relative to the parent // set_popup expects a position relative to the parent
QPoint transientPos = m_window->geometry().topLeft(); // this is absolute QPoint transientPos = m_window->geometry().topLeft(); // this is absolute
@@ -406,8 +413,9 @@ void QWaylandXdgSurface::setPopup(QWaylandWindow *parent) @@ -407,8 +414,9 @@ void QWaylandXdgSurface::setPopup(QWaylandWindow *parent)
positioner->set_anchor(QtWayland::xdg_positioner::anchor_top_left); positioner->set_anchor(QtWayland::xdg_positioner::anchor_top_left);
positioner->set_gravity(QtWayland::xdg_positioner::gravity_bottom_right); positioner->set_gravity(QtWayland::xdg_positioner::gravity_bottom_right);
positioner->set_size(m_window->geometry().width(), m_window->geometry().height()); positioner->set_size(m_window->geometry().width(), m_window->geometry().height());
@ -270,7 +270,7 @@ index d7d0ddf7..3999a5ee 100644
} }
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h
index 0c98be35..28ff76ba 100644 index 96785205..4b518f0a 100644
--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h --- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h
+++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h +++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell_p.h
@@ -131,14 +131,15 @@ private: @@ -131,14 +131,15 @@ private:
@ -397,5 +397,5 @@ index 73d1eb9c..747875b4 100644
void tst_xdgshell::switchPopups() void tst_xdgshell::switchPopups()
{ {
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From 4453f174d794b43b1df3f2090b5287ae3b61a047 Mon Sep 17 00:00:00 2001 From 2b46297649a4a002a046960e571917660927ed31 Mon Sep 17 00:00:00 2001
From: Ville Voutilainen <ville.voutilainen@qt.io> From: Ville Voutilainen <ville.voutilainen@qt.io>
Date: Mon, 18 Jan 2021 12:31:31 +0200 Date: Mon, 18 Jan 2021 12:31:31 +0200
Subject: [PATCH 37/49] Build fixes for GCC 11 Subject: [PATCH 35/57] Build fixes for GCC 11
Task-number: QTBUG-89977 Task-number: QTBUG-89977
Change-Id: I7e3d0964087865e8062f539f851a61f3df017dae Change-Id: I7e3d0964087865e8062f539f851a61f3df017dae
@ -24,5 +24,5 @@ index 5c6c83ba..fa9b7662 100644
namespace MockCompositor { namespace MockCompositor {
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From 790e949fdc17c3bceb8e4994c23e1222fb9c7410 Mon Sep 17 00:00:00 2001 From e043e3770da7ac7dc2e899e4f8f4d23eb8d53161 Mon Sep 17 00:00:00 2001
From: Roman Genkhel <roman.genhel@lge.com> From: Roman Genkhel <roman.genhel@lge.com>
Date: Thu, 12 Nov 2020 12:21:51 +0300 Date: Thu, 12 Nov 2020 12:21:51 +0300
Subject: [PATCH 38/49] Check pointer for null before use in ASSERT Subject: [PATCH 36/57] Check pointer for null before use in ASSERT
Task-number: QTBUG-85195 Task-number: QTBUG-85195
Change-Id: I331e54f6e58aa9d536351a55223610c60b3cb414 Change-Id: I331e54f6e58aa9d536351a55223610c60b3cb414
@ -30,5 +30,5 @@ index 6923c9a7..a4190e16 100644
buffer->setBusy(); buffer->setBusy();
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From 71f4a2efc4c6e031663aa6facc5aad3d6ecd65c0 Mon Sep 17 00:00:00 2001 From 604594c3d6734bb7c849edf3810d96eb2fbd0869 Mon Sep 17 00:00:00 2001
From: Paul Olav Tvete <paul.tvete@qt.io> From: Paul Olav Tvete <paul.tvete@qt.io>
Date: Mon, 6 Jul 2020 14:37:35 +0200 Date: Mon, 6 Jul 2020 14:37:35 +0200
Subject: [PATCH 39/49] Use wl_surface.damage_buffer on the client side Subject: [PATCH 37/57] Use wl_surface.damage_buffer on the client side
Prefer the newer, recommended damage_buffer when the compositor Prefer the newer, recommended damage_buffer when the compositor
supports it. supports it.
@ -127,5 +127,5 @@ index 949dc23d..d176837e 100644
uint32_t callback) override; uint32_t callback) override;
void surface_commit(Resource *resource) override; void surface_commit(Resource *resource) override;
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From 4d900fb4e68f8b3c0956948d613a072622fbc803 Mon Sep 17 00:00:00 2001 From ef75dcf8ec8ea3996aba46ec1fcf63b34421133c Mon Sep 17 00:00:00 2001
From: David Edmundson <davidedmundson@kde.org> From: David Edmundson <davidedmundson@kde.org>
Date: Fri, 5 Aug 2022 15:00:31 +0100 Date: Fri, 5 Aug 2022 15:00:31 +0100
Subject: [PATCH 40/49] Client: clear focus on touch cancel Subject: [PATCH 38/57] Client: clear focus on touch cancel
When we get a touch_cancel event all touches should be treated as When we get a touch_cancel event all touches should be treated as
lifted. lifted.
@ -112,5 +112,5 @@ index 296dbf47..210d8ddb 100644
Seat *m_seat = nullptr; Seat *m_seat = nullptr;
}; };
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From 3b6ac168f8827a3d06207bfaa63be8be8e2a1cd5 Mon Sep 17 00:00:00 2001 From 7bc9e2931cc1c81da23e245eafd42252f9cd6e9f Mon Sep 17 00:00:00 2001
From: David Edmundson <davidedmundson@kde.org> From: David Edmundson <davidedmundson@kde.org>
Date: Thu, 3 Feb 2022 19:42:33 +0000 Date: Thu, 3 Feb 2022 19:42:33 +0000
Subject: [PATCH 41/49] Guard mResizeDirty by the correctMutex Subject: [PATCH 39/57] Guard mResizeDirty by the correctMutex
mResizeDirty is used in the GUI thread in setCanResize which can be mResizeDirty is used in the GUI thread in setCanResize which can be
called from the GUI thread. It is queried and set whilst the resizeLock called from the GUI thread. It is queried and set whilst the resizeLock
@ -35,5 +35,5 @@ index 0967c975..c6477ec4 100644
} }
QRect exposeGeometry(QPoint(), geometry().size()); QRect exposeGeometry(QPoint(), geometry().size());
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From ab4b808176cdbb2c90e20f5bfaa36b9be1da6de1 Mon Sep 17 00:00:00 2001 From 4939cb0b313727474e340cf31a8037ede91517d3 Mon Sep 17 00:00:00 2001
From: Liang Qi <liang.qi@qt.io> From: Liang Qi <liang.qi@qt.io>
Date: Fri, 11 Mar 2022 09:17:25 +0100 Date: Fri, 11 Mar 2022 09:17:25 +0100
Subject: [PATCH 42/49] client: Synthesize enter/leave event for popup in Subject: [PATCH 40/57] client: Synthesize enter/leave event for popup in
xdg-shell xdg-shell
MIME-Version: 1.0 MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset=UTF-8
@ -23,7 +23,7 @@ Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
1 file changed, 27 insertions(+) 1 file changed, 27 insertions(+)
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
index 3999a5ee..79177540 100644 index 25c0e8c3..fa6d5808 100644
--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp --- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
+++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp +++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
@@ -221,6 +221,16 @@ QWaylandXdgSurface::Popup::~Popup() @@ -221,6 +221,16 @@ QWaylandXdgSurface::Popup::~Popup()
@ -43,7 +43,7 @@ index 3999a5ee..79177540 100644
} }
} }
@@ -437,6 +447,23 @@ void QWaylandXdgSurface::setGrabPopup(QWaylandWindow *parent, QWaylandInputDevic @@ -438,6 +448,23 @@ void QWaylandXdgSurface::setGrabPopup(QWaylandWindow *parent, QWaylandInputDevic
} }
setPopup(parent); setPopup(parent);
m_popup->grab(device, serial); m_popup->grab(device, serial);
@ -68,5 +68,5 @@ index 3999a5ee..79177540 100644
void QWaylandXdgSurface::xdg_surface_configure(uint32_t serial) void QWaylandXdgSurface::xdg_surface_configure(uint32_t serial)
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From ef8d198c36989a25093e99c2e952ef7c9e7bdac2 Mon Sep 17 00:00:00 2001 From c629110d32e33cf0292fcff4b508e5f31cdc51f0 Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org> From: Albert Astals Cid <aacid@kde.org>
Date: Fri, 9 Sep 2022 15:37:49 +0200 Date: Fri, 9 Sep 2022 15:37:49 +0200
Subject: [PATCH 43/49] Fix compile tests Subject: [PATCH 41/57] Fix compile tests
Broken in c618467da4c06528537026e2b78f92265bce446f Broken in c618467da4c06528537026e2b78f92265bce446f
--- ---
@ -25,5 +25,5 @@ index b063e0d9..2ea382f1 100644
{ {
auto e = window.m_events.takeFirst(); auto e = window.m_events.takeFirst();
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From c80442ead26f4532d139c750206e0bed04621b88 Mon Sep 17 00:00:00 2001 From 8f16be8260f181df34ef69cea784bd92e480e1ad Mon Sep 17 00:00:00 2001
From: Alexandros Frantzis <alexandros.frantzis@collabora.com> From: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Date: Wed, 11 May 2022 17:12:52 +0300 Date: Wed, 11 May 2022 17:12:52 +0300
Subject: [PATCH 44/49] Use CRLF line delimiter for text/uri-list data Subject: [PATCH 42/57] Use CRLF line delimiter for text/uri-list data
According to RFC 2483, which describes text/uri-list, the line delimiter According to RFC 2483, which describes text/uri-list, the line delimiter
must be CRLF (instead of the currently used LF). Some applications must be CRLF (instead of the currently used LF). Some applications
@ -36,5 +36,5 @@ index 051a91dc..e2fe1928 100644
} else { } else {
content = mimeData->data(mimeType); content = mimeData->data(mimeType);
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From 60c7d26098ec6b0da695e97e6f7cc5cd23fa2c56 Mon Sep 17 00:00:00 2001 From 2d37a9d3700578154275661a51ccf1b895f05260 Mon Sep 17 00:00:00 2001
From: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> From: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Date: Tue, 9 Nov 2021 13:23:41 +0100 Date: Tue, 9 Nov 2021 13:23:41 +0100
Subject: [PATCH 45/49] Fix missing update when toggling client-side Subject: [PATCH 43/57] Fix missing update when toggling client-side
decorations decorations
When CSD is toggled while a window is showing, it would change the When CSD is toggled while a window is showing, it would change the
@ -61,5 +61,5 @@ index 95e4e609..60c672ce 100644
QVERIFY(bufferSpy.empty()); // Make sure no extra buffers have arrived QVERIFY(bufferSpy.empty()); // Make sure no extra buffers have arrived
QVERIFY(!xdgToplevel()->surface()->m_waitingFrameCallbacks.empty()); QVERIFY(!xdgToplevel()->surface()->m_waitingFrameCallbacks.empty());
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From e0e030d90e0c1df94ddd9bee3e366c320d323ba1 Mon Sep 17 00:00:00 2001 From a20047ef5387673471af835cd3fba7e23585bc75 Mon Sep 17 00:00:00 2001
From: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> From: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Date: Mon, 8 Aug 2022 12:14:01 +0200 Date: Mon, 8 Aug 2022 12:14:01 +0200
Subject: [PATCH 46/49] Avoid calling requestUpdate from wrong thread Subject: [PATCH 44/57] Avoid calling requestUpdate from wrong thread
In certain circumstances, we can get to createDecoration() In certain circumstances, we can get to createDecoration()
from the render thread (from QWaylandGLContext::makeCurrent) from the render thread (from QWaylandGLContext::makeCurrent)
@ -39,5 +39,5 @@ index cb610510..771c96cc 100644
return mWindowDecoration; return mWindowDecoration;
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From 78ccf62673b20111da0579e2a8e0631894099348 Mon Sep 17 00:00:00 2001 From 1c4a808a3e81aa498da00b88d1ada8b40465d0f8 Mon Sep 17 00:00:00 2001
From: Liang Qi <liang.qi@qt.io> From: Liang Qi <liang.qi@qt.io>
Date: Mon, 13 Dec 2021 13:01:59 +0100 Date: Mon, 13 Dec 2021 13:01:59 +0100
Subject: [PATCH 47/49] Client: support high-dpi mode for window icon Subject: [PATCH 45/57] Client: support high-dpi mode for window icon
MIME-Version: 1.0 MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8 Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit Content-Transfer-Encoding: 8bit
@ -38,5 +38,5 @@ index e75fda3c..fa885143 100644
// Window title // Window title
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From 06222ef959875308e44fa01d89698bb2f3912056 Mon Sep 17 00:00:00 2001 From 38c84c26f3b14d49ef26416049115545e7627514 Mon Sep 17 00:00:00 2001
From: Fushan Wen <qydwhotmail@gmail.com> From: Fushan Wen <qydwhotmail@gmail.com>
Date: Sun, 18 Sep 2022 18:17:18 +0800 Date: Sun, 18 Sep 2022 18:17:18 +0800
Subject: [PATCH 48/49] Call `finishDrag()` in Subject: [PATCH 46/57] Call `finishDrag()` in
`QWaylandDataDevice::dragSourceCancelled()` `QWaylandDataDevice::dragSourceCancelled()`
Drags can either get finished or cancelled. If a drag is finished Drags can either get finished or cancelled. If a drag is finished
@ -34,5 +34,5 @@ index fbb5aa91..e3e60ed5 100644
} }
-- --
2.37.3 2.39.0

View File

@ -1,7 +1,7 @@
From 9c607c771acdb3d820be7f112db99213a6c6d7eb Mon Sep 17 00:00:00 2001 From 1ec6327d2e376e76a35cd36cd7d0ed9ddd4294ce Mon Sep 17 00:00:00 2001
From: David Edmundson <davidedmundson@kde.org> From: David Edmundson <davidedmundson@kde.org>
Date: Mon, 12 Sep 2022 13:28:08 +0100 Date: Mon, 12 Sep 2022 13:28:08 +0100
Subject: [PATCH 49/49] Hold surface read lock throughout Subject: [PATCH 47/57] Hold surface read lock throughout
QWaylandEglWindow::updateSurface QWaylandEglWindow::updateSurface
QWaylandEGLWindow::updateSurface is called from both the main and render QWaylandEGLWindow::updateSurface is called from both the main and render
@ -81,5 +81,5 @@ index 201b583b..64140672 100644
} }
-- --
2.37.3 2.39.0

View File

@ -0,0 +1,109 @@
From b965ae977891221ad6b02d8994352b263e14d2ee Mon Sep 17 00:00:00 2001
From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Date: Tue, 8 Nov 2022 16:10:18 +0200
Subject: [PATCH 48/57] Client: Ensure that wl_surface lives as long as qtquick
render thread needs it
wl_surface can be destroyed while qtquick render thread still uses it.
That can end up in eglSwapBuffers() using defunct wl_surface, which will
eventually lead to a crash due to the compositor posting an error.
This is partially cherry-pick of dff579147b07cd15888a47c303e36684e9930f9f
Change-Id: I044f40dd64e6672027a833379b57ccd9973d8305
---
src/client/qwaylandwindow.cpp | 13 ++++++++++++-
src/client/qwaylandwindow_p.h | 3 +++
.../client/wayland-egl/qwaylandglcontext.cpp | 6 +++++-
3 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index 771c96cc..5b97cd55 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -76,6 +76,7 @@ QWaylandWindow *QWaylandWindow::mMouseGrab = nullptr;
QWaylandWindow::QWaylandWindow(QWindow *window, QWaylandDisplay *display)
: QPlatformWindow(window)
, mDisplay(display)
+ , mSurfaceLock(QReadWriteLock::Recursive)
, mResizeAfterSwap(qEnvironmentVariableIsSet("QT_WAYLAND_RESIZE_AFTER_SWAP"))
{
{
@@ -237,6 +238,16 @@ bool QWaylandWindow::shouldCreateSubSurface() const
return QPlatformWindow::parent() != nullptr;
}
+void QWaylandWindow::beginFrame()
+{
+ mSurfaceLock.lockForRead();
+}
+
+void QWaylandWindow::endFrame()
+{
+ mSurfaceLock.unlock();
+}
+
void QWaylandWindow::reset()
{
closeChildPopups();
@@ -245,10 +256,10 @@ void QWaylandWindow::reset()
delete mSubSurfaceWindow;
mSubSurfaceWindow = nullptr;
- invalidateSurface();
if (mSurface) {
emit wlSurfaceDestroyed();
QWriteLocker lock(&mSurfaceLock);
+ invalidateSurface();
mSurface.reset();
}
diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h
index ea3d1995..e18609d9 100644
--- a/src/client/qwaylandwindow_p.h
+++ b/src/client/qwaylandwindow_p.h
@@ -207,6 +207,9 @@ public:
void handleUpdate();
void deliverUpdateRequest() override;
+ void beginFrame();
+ void endFrame();
+
void addChildPopup(QWaylandWindow* child);
void removeChildPopup(QWaylandWindow* child);
void closeChildPopups();
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
index c1f45fa6..5d6fb2bf 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
@@ -432,8 +432,10 @@ bool QWaylandGLContext::makeCurrent(QPlatformSurface *surface)
return true;
}
- if (window->isExposed())
+ if (window->isExposed()) {
+ window->beginFrame();
window->setCanResize(false);
+ }
if (m_decorationsContext != EGL_NO_CONTEXT && !window->decoration())
window->createDecoration();
@@ -449,6 +451,7 @@ bool QWaylandGLContext::makeCurrent(QPlatformSurface *surface)
if (!eglMakeCurrent(m_eglDisplay, eglSurface, eglSurface, m_context)) {
qWarning("QWaylandGLContext::makeCurrent: eglError: %x, this: %p \n", eglGetError(), this);
window->setCanResize(true);
+ window->endFrame();
return false;
}
@@ -502,6 +505,7 @@ void QWaylandGLContext::swapBuffers(QPlatformSurface *surface)
eglSwapBuffers(m_eglDisplay, eglSurface);
window->setCanResize(true);
+ window->endFrame();
}
GLuint QWaylandGLContext::defaultFramebufferObject(QPlatformSurface *surface) const
--
2.39.0

View File

@ -0,0 +1,90 @@
From 9146c96b84392df39d2962c3b8bcf25bbcf93ff5 Mon Sep 17 00:00:00 2001
From: David Redondo <qt@david-redondo.de>
Date: Wed, 8 Jun 2022 11:25:59 +0200
Subject: [PATCH 49/57] Keep toplevel windows in the top left corner of the
screen
We can't know the actual position of a window on the screen. This causes
an issue when Widgets try to position a popup/menu absolutely and keep
it on the screen when the screen geometry doesn't include (0,0).
Instead report their positions always as the top left corner of
the screen that they are on.
This new behavior can be disabled for qt-shell or via an environment
variable by users that rely on the old behavior.
Fixes: QTBUG-85297
Change-Id: Iacb91cb03a0df87af950115760d2f41124ac06a3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Aleix Pol Gonzalez <aleixpol@kde.org>
(cherry picked from commit a46795a22e05722917c6ebc60ed01bebf49898ae)
---
src/client/qwaylandintegration.cpp | 3 +++
src/client/qwaylandwindow.cpp | 14 +++++++++++++-
src/client/qwaylandwindow_p.h | 3 +++
3 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp
index fbf00c6b..54861600 100644
--- a/src/client/qwaylandintegration.cpp
+++ b/src/client/qwaylandintegration.cpp
@@ -125,6 +125,9 @@ QWaylandIntegration::QWaylandIntegration()
#endif
reconfigureInputContext();
+
+ QWaylandWindow::fixedToplevelPositions =
+ !qEnvironmentVariableIsSet("QT_WAYLAND_DISABLE_FIXED_POSITIONS");
}
QWaylandIntegration::~QWaylandIntegration()
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index 5b97cd55..01cbbf39 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -361,8 +361,13 @@ void QWaylandWindow::setGeometry_helper(const QRect &rect)
}
}
-void QWaylandWindow::setGeometry(const QRect &rect)
+void QWaylandWindow::setGeometry(const QRect &r)
{
+ auto rect = r;
+ if (fixedToplevelPositions && !QPlatformWindow::parent() && window()->type() != Qt::Popup
+ && window()->type() != Qt::ToolTip) {
+ rect.moveTo(screen()->geometry().topLeft());
+ }
setGeometry_helper(rect);
if (window()->isVisible() && rect.isValid()) {
@@ -1044,6 +1049,13 @@ void QWaylandWindow::handleScreensChanged()
QWindowSystemInterface::handleWindowScreenChanged(window(), newScreen->QPlatformScreen::screen());
mLastReportedScreen = newScreen;
+ if (fixedToplevelPositions && !QPlatformWindow::parent() && window()->type() != Qt::Popup
+ && window()->type() != Qt::ToolTip
+ && geometry().topLeft() != newScreen->geometry().topLeft()) {
+ auto geometry = this->geometry();
+ geometry.moveTo(newScreen->geometry().topLeft());
+ setGeometry(geometry);
+ }
int scale = newScreen->isPlaceholder() ? 1 : static_cast<QWaylandScreen *>(newScreen)->scale();
if (scale != mScale) {
diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h
index e18609d9..a8ee2696 100644
--- a/src/client/qwaylandwindow_p.h
+++ b/src/client/qwaylandwindow_p.h
@@ -98,6 +98,9 @@ public:
QWaylandWindow(QWindow *window, QWaylandDisplay *display);
~QWaylandWindow() override;
+ // Keep Toplevels position on the top left corner of their screen
+ static inline bool fixedToplevelPositions = true;
+
virtual WindowType windowType() const = 0;
virtual void ensureSize();
WId winId() const override;
--
2.39.0

View File

@ -0,0 +1,103 @@
From 7f04725f5121bc0b05ad2289a1fef362aaa48b2f Mon Sep 17 00:00:00 2001
From: David Edmundson <kde@davidedmundson.co.uk>
Date: Mon, 14 Nov 2022 10:43:25 +0000
Subject: [PATCH 50/57] Revert "Client: Ensure that wl_surface lives as long as
qtquick render thread needs it"
This reverts commit 81a7702a87f386a60a0ac8c902e203daae044d81
---
src/client/qwaylandwindow.cpp | 13 +------------
src/client/qwaylandwindow_p.h | 3 ---
.../client/wayland-egl/qwaylandglcontext.cpp | 6 +-----
3 files changed, 2 insertions(+), 20 deletions(-)
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index 01cbbf39..d4083121 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -76,7 +76,6 @@ QWaylandWindow *QWaylandWindow::mMouseGrab = nullptr;
QWaylandWindow::QWaylandWindow(QWindow *window, QWaylandDisplay *display)
: QPlatformWindow(window)
, mDisplay(display)
- , mSurfaceLock(QReadWriteLock::Recursive)
, mResizeAfterSwap(qEnvironmentVariableIsSet("QT_WAYLAND_RESIZE_AFTER_SWAP"))
{
{
@@ -238,16 +237,6 @@ bool QWaylandWindow::shouldCreateSubSurface() const
return QPlatformWindow::parent() != nullptr;
}
-void QWaylandWindow::beginFrame()
-{
- mSurfaceLock.lockForRead();
-}
-
-void QWaylandWindow::endFrame()
-{
- mSurfaceLock.unlock();
-}
-
void QWaylandWindow::reset()
{
closeChildPopups();
@@ -256,10 +245,10 @@ void QWaylandWindow::reset()
delete mSubSurfaceWindow;
mSubSurfaceWindow = nullptr;
+ invalidateSurface();
if (mSurface) {
emit wlSurfaceDestroyed();
QWriteLocker lock(&mSurfaceLock);
- invalidateSurface();
mSurface.reset();
}
diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h
index a8ee2696..487a91a6 100644
--- a/src/client/qwaylandwindow_p.h
+++ b/src/client/qwaylandwindow_p.h
@@ -210,9 +210,6 @@ public:
void handleUpdate();
void deliverUpdateRequest() override;
- void beginFrame();
- void endFrame();
-
void addChildPopup(QWaylandWindow* child);
void removeChildPopup(QWaylandWindow* child);
void closeChildPopups();
diff --git a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
index 5d6fb2bf..c1f45fa6 100644
--- a/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
+++ b/src/hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp
@@ -432,10 +432,8 @@ bool QWaylandGLContext::makeCurrent(QPlatformSurface *surface)
return true;
}
- if (window->isExposed()) {
- window->beginFrame();
+ if (window->isExposed())
window->setCanResize(false);
- }
if (m_decorationsContext != EGL_NO_CONTEXT && !window->decoration())
window->createDecoration();
@@ -451,7 +449,6 @@ bool QWaylandGLContext::makeCurrent(QPlatformSurface *surface)
if (!eglMakeCurrent(m_eglDisplay, eglSurface, eglSurface, m_context)) {
qWarning("QWaylandGLContext::makeCurrent: eglError: %x, this: %p \n", eglGetError(), this);
window->setCanResize(true);
- window->endFrame();
return false;
}
@@ -505,7 +502,6 @@ void QWaylandGLContext::swapBuffers(QPlatformSurface *surface)
eglSwapBuffers(m_eglDisplay, eglSurface);
window->setCanResize(true);
- window->endFrame();
}
GLuint QWaylandGLContext::defaultFramebufferObject(QPlatformSurface *surface) const
--
2.39.0

View File

@ -0,0 +1,53 @@
From ee6465749449f83f4d0028ff7988ca0c77b3506d Mon Sep 17 00:00:00 2001
From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Date: Thu, 17 Nov 2022 15:25:37 +0200
Subject: [PATCH 51/57] Client: Add F_SEAL_SHRINK seal to shm backing file
This lets libwayland-server avoid installing a SIGBUS handler when it
wants to mmap() the backing file and access the contents of shared
memory client buffers.
Change-Id: Id0b17f729799535d73e8700c5a99c32fd88a068a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Edmundson <davidedmundson@kde.org>
(cherry picked from commit 0c1cbb376e0cf878e3a91ab4917fe784a3b4c547)
---
src/client/qwaylandshmbackingstore.cpp | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/client/qwaylandshmbackingstore.cpp b/src/client/qwaylandshmbackingstore.cpp
index dc7ff670..98acd42d 100644
--- a/src/client/qwaylandshmbackingstore.cpp
+++ b/src/client/qwaylandshmbackingstore.cpp
@@ -52,6 +52,7 @@
#include <QtWaylandClient/private/wayland-wayland-client-protocol.h>
+#include <fcntl.h>
#include <unistd.h>
#include <sys/mman.h>
@@ -61,6 +62,9 @@
# ifndef MFD_CLOEXEC
# define MFD_CLOEXEC 0x0001U
# endif
+# ifndef MFD_ALLOW_SEALING
+# define MFD_ALLOW_SEALING 0x0002U
+# endif
#endif
QT_BEGIN_NAMESPACE
@@ -75,7 +79,9 @@ QWaylandShmBuffer::QWaylandShmBuffer(QWaylandDisplay *display,
int fd = -1;
#ifdef SYS_memfd_create
- fd = syscall(SYS_memfd_create, "wayland-shm", MFD_CLOEXEC);
+ fd = syscall(SYS_memfd_create, "wayland-shm", MFD_CLOEXEC | MFD_ALLOW_SEALING);
+ if (fd >= 0)
+ fcntl(fd, F_ADD_SEALS, F_SEAL_SHRINK | F_SEAL_SEAL);
#endif
QScopedPointer<QFile> filePointer;
--
2.39.0

View File

@ -0,0 +1,31 @@
From 4c56a6d18da10b42a5e01d31b3d636cfd551a767 Mon Sep 17 00:00:00 2001
From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Date: Mon, 21 Nov 2022 18:39:40 +0200
Subject: [PATCH 52/57] Client: Call wl_output_release() upon QWaylandScreen
destruction
It ensures that the proxy gets destroyed.
Change-Id: I915cc8814e33dd3b0405b2bf82bd12ce6b5f785b
Reviewed-by: David Edmundson <davidedmundson@kde.org>
(cherry picked from commit 054e54759dbd6c3e76b55d5c4a9a54f62967ad1a)
---
src/client/qwaylandscreen.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/client/qwaylandscreen.cpp b/src/client/qwaylandscreen.cpp
index 7c2d9be3..64ae4fe7 100644
--- a/src/client/qwaylandscreen.cpp
+++ b/src/client/qwaylandscreen.cpp
@@ -81,6 +81,8 @@ QWaylandScreen::~QWaylandScreen()
{
if (zxdg_output_v1::isInitialized())
zxdg_output_v1::destroy();
+ if (wl_output::isInitialized() && wl_output_get_version(wl_output::object()) >= WL_OUTPUT_RELEASE_SINCE_VERSION)
+ wl_output::release();
}
uint QWaylandScreen::requiredEvents() const
--
2.39.0

View File

@ -0,0 +1,30 @@
From 66110372de281b85acff08acd68d127163c7d83e Mon Sep 17 00:00:00 2001
From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Date: Tue, 22 Nov 2022 12:33:41 +0200
Subject: [PATCH 53/57] Client: Bump wl_output version
wl_output_release is available starting with wl_output v3.
Change-Id: I21822b26728ffb9318f1f8b4bd82ef7329682838
Reviewed-by: David Edmundson <davidedmundson@kde.org>
(cherry picked from commit c14916f5fd84f6b5483024b3df77592661a0f04e)
---
src/client/qwaylandscreen.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/client/qwaylandscreen.cpp b/src/client/qwaylandscreen.cpp
index 64ae4fe7..5537dafd 100644
--- a/src/client/qwaylandscreen.cpp
+++ b/src/client/qwaylandscreen.cpp
@@ -60,7 +60,7 @@ QWaylandXdgOutputManagerV1::QWaylandXdgOutputManagerV1(QWaylandDisplay* display,
}
QWaylandScreen::QWaylandScreen(QWaylandDisplay *waylandDisplay, int version, uint32_t id)
- : QtWayland::wl_output(waylandDisplay->wl_registry(), id, qMin(version, 2))
+ : QtWayland::wl_output(waylandDisplay->wl_registry(), id, qMin(version, 3))
, m_outputId(id)
, mWaylandDisplay(waylandDisplay)
, mOutputName(QStringLiteral("Screen%1").arg(id))
--
2.39.0

View File

@ -0,0 +1,166 @@
From 776598deb927c259cd2f4d95cfd72677478ecf59 Mon Sep 17 00:00:00 2001
From: Weng Xuetian <wengxt@gmail.com>
Date: Sun, 27 Nov 2022 12:44:40 -0800
Subject: [PATCH 54/57] Fix frame sync related to unprotected multithread
access
There is a few crashes happens in real life that frame callback is
double-free'd and hit an assertion in wayland-client. e.g.
https://bugs.kde.org/show_bug.cgi?id=450003
This is due to the WaylandEventThread and calls to QWaylandWindow::reset
may free and unset the mFrameCallback at the same time. mFrameSyncMutex
should be used to protect such access.
Pick-to: 6.4
Change-Id: Ie01d08d07a2f10f70606ed1935caac09cb4f0382
(cherry picked from commit b6cbb5e323822d6e3ef5ed4dd5a4c4cc1ea85038)
---
src/client/qwaylandwindow.cpp | 64 ++++++++++++++++++++---------------
src/client/qwaylandwindow_p.h | 11 +++---
2 files changed, 43 insertions(+), 32 deletions(-)
diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp
index d4083121..fb2c59dc 100644
--- a/src/client/qwaylandwindow.cpp
+++ b/src/client/qwaylandwindow.cpp
@@ -252,13 +252,16 @@ void QWaylandWindow::reset()
mSurface.reset();
}
- if (mFrameCallback) {
- wl_callback_destroy(mFrameCallback);
- mFrameCallback = nullptr;
- }
+ {
+ QMutexLocker lock(&mFrameSyncMutex);
+ if (mFrameCallback) {
+ wl_callback_destroy(mFrameCallback);
+ mFrameCallback = nullptr;
+ }
- mFrameCallbackElapsedTimer.invalidate();
- mWaitingForFrameCallback = false;
+ mFrameCallbackElapsedTimer.invalidate();
+ mWaitingForFrameCallback = false;
+ }
mFrameCallbackTimedOut = false;
mMask = QRegion();
@@ -633,18 +636,21 @@ const wl_callback_listener QWaylandWindow::callbackListener = {
[](void *data, wl_callback *callback, uint32_t time) {
Q_UNUSED(time);
auto *window = static_cast<QWaylandWindow*>(data);
-
- Q_ASSERT(callback == window->mFrameCallback);
- wl_callback_destroy(callback);
- window->mFrameCallback = nullptr;
-
- window->handleFrameCallback();
+ window->handleFrameCallback(callback);
}
};
-void QWaylandWindow::handleFrameCallback()
+void QWaylandWindow::handleFrameCallback(wl_callback* callback)
{
QMutexLocker locker(&mFrameSyncMutex);
+ if (!mFrameCallback) {
+ // This means the callback is already unset by QWaylandWindow::reset.
+ // The wl_callback object will be destroyed there too.
+ return;
+ }
+ Q_ASSERT(callback == mFrameCallback);
+ wl_callback_destroy(callback);
+ mFrameCallback = nullptr;
mWaitingForFrameCallback = false;
mFrameCallbackElapsedTimer.invalidate();
@@ -1169,19 +1175,24 @@ void QWaylandWindow::timerEvent(QTimerEvent *event)
if (event->timerId() != mFrameCallbackCheckIntervalTimerId)
return;
- bool callbackTimerExpired = mFrameCallbackElapsedTimer.hasExpired(mFrameCallbackTimeout);
- if (!mFrameCallbackElapsedTimer.isValid() || callbackTimerExpired ) {
- killTimer(mFrameCallbackCheckIntervalTimerId);
- mFrameCallbackCheckIntervalTimerId = -1;
- }
- if (mFrameCallbackElapsedTimer.isValid() && callbackTimerExpired) {
- mFrameCallbackElapsedTimer.invalidate();
+ {
+ QMutexLocker lock(&mFrameSyncMutex);
- qCDebug(lcWaylandBackingstore) << "Didn't receive frame callback in time, window should now be inexposed";
- mFrameCallbackTimedOut = true;
- mWaitingForUpdate = false;
- sendExposeEvent(QRect());
+ bool callbackTimerExpired = mFrameCallbackElapsedTimer.hasExpired(mFrameCallbackTimeout);
+ if (!mFrameCallbackElapsedTimer.isValid() || callbackTimerExpired ) {
+ killTimer(mFrameCallbackCheckIntervalTimerId);
+ mFrameCallbackCheckIntervalTimerId = -1;
+ }
+ if (!mFrameCallbackElapsedTimer.isValid() || !callbackTimerExpired) {
+ return;
+ }
+ mFrameCallbackElapsedTimer.invalidate();
}
+
+ qCDebug(lcWaylandBackingstore) << "Didn't receive frame callback in time, window should now be inexposed";
+ mFrameCallbackTimedOut = true;
+ mWaitingForUpdate = false;
+ sendExposeEvent(QRect());
}
void QWaylandWindow::requestUpdate()
@@ -1224,15 +1235,14 @@ void QWaylandWindow::handleUpdate()
{
qCDebug(lcWaylandBackingstore) << "handleUpdate" << QThread::currentThread();
- if (mWaitingForFrameCallback)
- return;
-
// TODO: Should sync subsurfaces avoid requesting frame callbacks?
QReadLocker lock(&mSurfaceLock);
if (!mSurface)
return;
QMutexLocker locker(&mFrameSyncMutex);
+ if (mWaitingForFrameCallback)
+ return;
struct ::wl_surface *wrappedSurface = reinterpret_cast<struct ::wl_surface *>(wl_proxy_create_wrapper(mSurface->object()));
wl_proxy_set_queue(reinterpret_cast<wl_proxy *>(wrappedSurface), mDisplay->frameEventQueue());
diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h
index 487a91a6..2f219d8c 100644
--- a/src/client/qwaylandwindow_p.h
+++ b/src/client/qwaylandwindow_p.h
@@ -237,12 +237,13 @@ protected:
Qt::MouseButtons mMousePressedInContentArea = Qt::NoButton;
WId mWindowId;
- bool mWaitingForFrameCallback = false;
bool mFrameCallbackTimedOut = false; // Whether the frame callback has timed out
- QAtomicInt mWaitingForUpdateDelivery = false;
int mFrameCallbackCheckIntervalTimerId = -1;
- QElapsedTimer mFrameCallbackElapsedTimer;
- struct ::wl_callback *mFrameCallback = nullptr;
+ QAtomicInt mWaitingForUpdateDelivery = false;
+
+ bool mWaitingForFrameCallback = false; // Protected by mFrameSyncMutex
+ QElapsedTimer mFrameCallbackElapsedTimer; // Protected by mFrameSyncMutex
+ struct ::wl_callback *mFrameCallback = nullptr; // Protected by mFrameSyncMutex
QMutex mFrameSyncMutex;
QWaitCondition mFrameSyncWait;
@@ -297,7 +298,7 @@ private:
QRect mLastExposeGeometry;
static const wl_callback_listener callbackListener;
- void handleFrameCallback();
+ void handleFrameCallback(struct ::wl_callback* callback);
static QWaylandWindow *mMouseGrab;
--
2.39.0

View File

@ -0,0 +1,66 @@
From d0e8f938567f841a779d7365b8b5037037045fc5 Mon Sep 17 00:00:00 2001
From: Vlad Zahorodnii <vlad.zahorodnii@kde.org>
Date: Tue, 27 Sep 2022 22:05:07 +0300
Subject: [PATCH 55/57] Client: Handle zwp_primary_selection_device_manager_v1
global removal
The zwp_primary_selection_device_manager_v1 global can be withdrawn if
the compositor disables the primary selection, i.e. middle click to
paste selected text. QtWayland needs to handle that; otherwise the app
can crash.
Pick-to: 6.5
Change-Id: Idbb4db18b605f85a5951fa12c1bdf61898b0d123
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
(cherry picked from commit 45163234a4e4baad0012d3ee07501093d98ba91c)
---
src/client/qwaylanddisplay.cpp | 9 +++++++++
src/client/qwaylandprimaryselectionv1.cpp | 5 -----
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp
index e8613ed8..c01e238b 100644
--- a/src/client/qwaylanddisplay.cpp
+++ b/src/client/qwaylanddisplay.cpp
@@ -515,6 +515,8 @@ void QWaylandDisplay::registry_global(uint32_t id, const QString &interface, uin
#if QT_CONFIG(wayland_client_primary_selection)
} else if (interface == QStringLiteral("zwp_primary_selection_device_manager_v1")) {
mPrimarySelectionManager.reset(new QWaylandPrimarySelectionDeviceManagerV1(this, id, 1));
+ for (QWaylandInputDevice *inputDevice : qAsConst(mInputDevices))
+ inputDevice->setPrimarySelectionDevice(mPrimarySelectionManager->createDevice(inputDevice));
#endif
} else if (interface == QStringLiteral("zwp_text_input_manager_v2") && !mClientSideInputContextRequested) {
mTextInputManager.reset(new QtWayland::zwp_text_input_manager_v2(registry, id, 1));
@@ -573,6 +575,13 @@ void QWaylandDisplay::registry_global_remove(uint32_t id)
inputDevice->setTextInput(nullptr);
mWaylandIntegration->reconfigureInputContext();
}
+#if QT_CONFIG(wayland_client_primary_selection)
+ if (global.interface == QStringLiteral("zwp_primary_selection_device_manager_v1")) {
+ mPrimarySelectionManager.reset();
+ for (QWaylandInputDevice *inputDevice : qAsConst(mInputDevices))
+ inputDevice->setPrimarySelectionDevice(nullptr);
+ }
+#endif
mGlobals.removeAt(i);
break;
}
diff --git a/src/client/qwaylandprimaryselectionv1.cpp b/src/client/qwaylandprimaryselectionv1.cpp
index 832f9678..ea508771 100644
--- a/src/client/qwaylandprimaryselectionv1.cpp
+++ b/src/client/qwaylandprimaryselectionv1.cpp
@@ -54,11 +54,6 @@ QWaylandPrimarySelectionDeviceManagerV1::QWaylandPrimarySelectionDeviceManagerV1
: zwp_primary_selection_device_manager_v1(display->wl_registry(), id, qMin(version, uint(1)))
, m_display(display)
{
- // Create devices for all seats.
- // This only works if we get the global before all devices
- const auto seats = m_display->inputDevices();
- for (auto *seat : seats)
- seat->setPrimarySelectionDevice(createDevice(seat));
}
QWaylandPrimarySelectionDeviceV1 *QWaylandPrimarySelectionDeviceManagerV1::createDevice(QWaylandInputDevice *seat)
--
2.39.0

View File

@ -0,0 +1,26 @@
From 2904e1b3c3004153b49c4dabfec04cc1ff5e3284 Mon Sep 17 00:00:00 2001
From: Aleix Pol <aleixpol@kde.org>
Date: Mon, 19 Dec 2022 15:31:03 +0100
Subject: [PATCH 56/57] Fixes the build on CentOS
Change-Id: I3c21972e7681be99b0f45c3ea3a57be285e4ff8e
---
src/client/qwaylandshmbackingstore.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/client/qwaylandshmbackingstore.cpp b/src/client/qwaylandshmbackingstore.cpp
index 98acd42d..41cffdf7 100644
--- a/src/client/qwaylandshmbackingstore.cpp
+++ b/src/client/qwaylandshmbackingstore.cpp
@@ -78,7 +78,7 @@ QWaylandShmBuffer::QWaylandShmBuffer(QWaylandDisplay *display,
int alloc = stride * size.height();
int fd = -1;
-#ifdef SYS_memfd_create
+#if defined(SYS_memfd_create) && defined(F_SEAL_SEAL)
fd = syscall(SYS_memfd_create, "wayland-shm", MFD_CLOEXEC | MFD_ALLOW_SEALING);
if (fd >= 0)
fcntl(fd, F_ADD_SEALS, F_SEAL_SHRINK | F_SEAL_SEAL);
--
2.39.0

View File

@ -0,0 +1,56 @@
From f6a1e838e371dc90272c62daeea597fe487dec3e Mon Sep 17 00:00:00 2001
From: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Date: Mon, 23 May 2022 09:47:24 +0200
Subject: [PATCH 57/57] client: Avoid protocol error with invalid min/max size
If the application sets an invalid minimum and maximum size
(where the minimum is higher than the maximum), then we
would blindly send this over the protocol, which is a protocol
error according to the spec. Qt compositors will warn about
this and ignore the size, but mainly because "but there's no
matching error defined" according to the comment. Other
compositors may close the connection when this happens.
To avoid crashing the app based on bogus min/max size, we
make sure we never send a maximum size which is less than
the minimum size. This corresponds to the behavior of
compositors which accept the size without raising an error:
the minimum size takes precedence.
Note that 0 means "no maximum size" in the protocol, so we
cap the value before applying this logic.
[ChangeLog][Client] Fixed an issue where setting an invalid
minimum and maximum size on a window would cause some
compositors to raise a protocol error.
Pick-to: 6.2 6.3
Fixes: QTBUG-102626
Fixes: QTBUG-103391
Change-Id: I4004a4550a9fe3dae6a27169b4d1a9a616e21841
Reviewed-by: David Edmundson <davidedmundson@kde.org>
(cherry picked from commit 487de47277ccc31891f6340ce4c971c91336d9a4)
---
src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
index fa6d5808..67342b0c 100644
--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
+++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp
@@ -384,10 +384,10 @@ void QWaylandXdgSurface::setSizeHints()
const int minHeight = qMax(0, m_window->windowMinimumSize().height());
m_toplevel->set_min_size(minWidth, minHeight);
- int maxWidth = qMax(0, m_window->windowMaximumSize().width());
+ int maxWidth = qMax(minWidth, m_window->windowMaximumSize().width());
if (maxWidth == QWINDOWSIZE_MAX)
maxWidth = 0;
- int maxHeight = qMax(0, m_window->windowMaximumSize().height());
+ int maxHeight = qMax(minHeight, m_window->windowMaximumSize().height());
if (maxHeight == QWINDOWSIZE_MAX)
maxHeight = 0;
m_toplevel->set_max_size(maxWidth, maxHeight);
--
2.39.0

View File

@ -2,7 +2,7 @@
Summary: Qt5 - Wayland platform support and QtCompositor module Summary: Qt5 - Wayland platform support and QtCompositor module
Name: qt5-%{qt_module} Name: qt5-%{qt_module}
Version: 5.15.7 Version: 5.15.8
Release: 1%{?dist} Release: 1%{?dist}
License: LGPLv3 License: LGPLv3
@ -13,7 +13,7 @@ Source0: https://download.qt.io/official_releases/qt/%{majmin}/%{version}/submod
## Upstream patches ## Upstream patches
## repo: https://invent.kde.org/qt/qt/qtwayland ## repo: https://invent.kde.org/qt/qt/qtwayland
## branch: kde/5.15 ## branch: kde/5.15
## git format-patch v5.15.7-lts-lgpl ## git format-patch v5.15.8-lts-lgpl
Patch1: 0001-Client-Announce-an-output-after-receiving-more-compl.patch Patch1: 0001-Client-Announce-an-output-after-receiving-more-compl.patch
Patch2: 0002-Fix-issue-with-repeated-window-size-changes.patch Patch2: 0002-Fix-issue-with-repeated-window-size-changes.patch
Patch3: 0003-Client-Connect-drags-being-accepted-to-updating-the-.patch Patch3: 0003-Client-Connect-drags-being-accepted-to-updating-the-.patch
@ -25,44 +25,52 @@ Patch8: 0008-Hook-up-queryKeyboardModifers.patch
Patch9: 0009-Correctly-detect-if-image-format-is-supported-by-QIm.patch Patch9: 0009-Correctly-detect-if-image-format-is-supported-by-QIm.patch
Patch10: 0010-Client-Don-t-always-recreate-frame-callbacks.patch Patch10: 0010-Client-Don-t-always-recreate-frame-callbacks.patch
Patch11: 0011-Client-Always-destroy-frame-callback-in-the-actual-c.patch Patch11: 0011-Client-Always-destroy-frame-callback-in-the-actual-c.patch
Patch12: 0012-Fix-the-logic-for-decoding-modifiers-map-in-Wayland-.patch Patch12: 0012-Wayland-client-use-wl_keyboard-to-determine-active-s.patch
Patch13: 0013-Wayland-client-use-wl_keyboard-to-determine-active-s.patch Patch13: 0013-Client-do-not-empty-clipboard-when-a-new-popup-windo.patch
Patch14: 0014-Client-do-not-empty-clipboard-when-a-new-popup-windo.patch Patch14: 0014-Set-preedit-cursor-when-cursor-equals-to-0.patch
Patch15: 0015-Set-preedit-cursor-when-cursor-equals-to-0.patch Patch15: 0015-Client-Implement-DataDeviceV3.patch
Patch16: 0016-Client-Implement-DataDeviceV3.patch Patch16: 0016-Client-Delay-deletion-of-QDrag-object-until-after-we.patch
Patch17: 0017-Client-Delay-deletion-of-QDrag-object-until-after-we.patch Patch17: 0017-Client-Avoid-processing-of-events-when-showing-windo.patch
Patch18: 0018-Client-Avoid-processing-of-events-when-showing-windo.patch Patch18: 0018-Handle-registry_global-out-of-constructor.patch
Patch19: 0019-Handle-registry_global-out-of-constructor.patch Patch19: 0019-Connect-flushRequest-after-forceRoundTrip.patch
Patch20: 0020-Connect-flushRequest-after-forceRoundTrip.patch Patch20: 0020-Move-the-wayland-socket-polling-to-a-separate-event-.patch
Patch21: 0021-Move-the-wayland-socket-polling-to-a-separate-event-.patch Patch21: 0021-Fix-crash-if-no-input-method-module-could-be-loaded.patch
Patch22: 0022-Do-not-create-decorations-when-the-shellSurface-is-n.patch Patch22: 0022-Client-Remove-mWaitingForUpdateDelivery.patch
Patch23: 0023-Fix-crash-if-no-input-method-module-could-be-loaded.patch Patch23: 0023-Cursor-position-0-should-still-show-the-cursor.patch
Patch24: 0024-Client-Remove-mWaitingForUpdateDelivery.patch Patch24: 0024-Update-the-preedit-styling-mapping.patch
Patch25: 0025-Cursor-position-0-should-still-show-the-cursor.patch Patch25: 0025-client-Simplify-round-trip-behavior.patch
Patch26: 0026-Update-the-preedit-styling-mapping.patch Patch26: 0026-Client-Fix-opaque-region-setter.patch
Patch27: 0027-client-Simplify-round-trip-behavior.patch Patch27: 0027-Use-proper-dependencies-in-compile-tests.patch
Patch28: 0028-Client-Fix-opaque-region-setter.patch Patch28: 0028-client-update-button-state-and-etc-in-pointer_leave.patch
Patch29: 0029-Use-proper-dependencies-in-compile-tests.patch Patch29: 0029-Revert-Client-Remove-mWaitingForUpdateDelivery.patch
Patch30: 0030-client-update-button-state-and-etc-in-pointer_leave.patch Patch30: 0030-Fix-race-condition-on-mWaitingForUpdateDelivery.patch
Patch31: 0031-Revert-Client-Remove-mWaitingForUpdateDelivery.patch Patch31: 0031-use-poll-2-when-reading-from-clipboard.patch
Patch32: 0032-Fix-race-condition-on-mWaitingForUpdateDelivery.patch Patch32: 0032-Reduce-memory-leakage.patch
Patch33: 0033-use-poll-2-when-reading-from-clipboard.patch Patch33: 0033-Fix-build-with-libcxx-missing-array-include.patch
Patch34: 0034-Reduce-memory-leakage.patch Patch34: 0034-Only-close-popup-in-the-the-hierchary.patch
Patch35: 0035-Fix-build-with-libcxx-missing-array-include.patch Patch35: 0035-Build-fixes-for-GCC-11.patch
Patch36: 0036-Only-close-popup-in-the-the-hierchary.patch Patch36: 0036-Check-pointer-for-null-before-use-in-ASSERT.patch
Patch37: 0037-Build-fixes-for-GCC-11.patch Patch37: 0037-Use-wl_surface.damage_buffer-on-the-client-side.patch
Patch38: 0038-Check-pointer-for-null-before-use-in-ASSERT.patch Patch38: 0038-Client-clear-focus-on-touch-cancel.patch
Patch39: 0039-Use-wl_surface.damage_buffer-on-the-client-side.patch Patch39: 0039-Guard-mResizeDirty-by-the-correctMutex.patch
Patch40: 0040-Client-clear-focus-on-touch-cancel.patch Patch40: 0040-client-Synthesize-enter-leave-event-for-popup-in-xdg.patch
Patch41: 0041-Guard-mResizeDirty-by-the-correctMutex.patch Patch41: 0041-Fix-compile-tests.patch
Patch42: 0042-client-Synthesize-enter-leave-event-for-popup-in-xdg.patch Patch42: 0042-Use-CRLF-line-delimiter-for-text-uri-list-data.patch
Patch43: 0043-Fix-compile-tests.patch Patch43: 0043-Fix-missing-update-when-toggling-client-side-decorat.patch
Patch44: 0044-Use-CRLF-line-delimiter-for-text-uri-list-data.patch Patch44: 0044-Avoid-calling-requestUpdate-from-wrong-thread.patch
Patch45: 0045-Fix-missing-update-when-toggling-client-side-decorat.patch Patch45: 0045-Client-support-high-dpi-mode-for-window-icon.patch
Patch46: 0046-Avoid-calling-requestUpdate-from-wrong-thread.patch Patch46: 0046-Call-finishDrag-in-QWaylandDataDevice-dragSourceCanc.patch
Patch47: 0047-Client-support-high-dpi-mode-for-window-icon.patch Patch47: 0047-Hold-surface-read-lock-throughout-QWaylandEglWindow-.patch
Patch48: 0048-Call-finishDrag-in-QWaylandDataDevice-dragSourceCanc.patch Patch48: 0048-Client-Ensure-that-wl_surface-lives-as-long-as-qtqui.patch
Patch49: 0049-Hold-surface-read-lock-throughout-QWaylandEglWindow-.patch Patch49: 0049-Keep-toplevel-windows-in-the-top-left-corner-of-the-.patch
Patch50: 0050-Revert-Client-Ensure-that-wl_surface-lives-as-long-a.patch
Patch51: 0051-Client-Add-F_SEAL_SHRINK-seal-to-shm-backing-file.patch
Patch52: 0052-Client-Call-wl_output_release-upon-QWaylandScreen-de.patch
Patch53: 0053-Client-Bump-wl_output-version.patch
Patch54: 0054-Fix-frame-sync-related-to-unprotected-multithread-ac.patch
Patch55: 0055-Client-Handle-zwp_primary_selection_device_manager_v.patch
Patch56: 0056-Fixes-the-build-on-CentOS.patch
Patch57: 0057-client-Avoid-protocol-error-with-invalid-min-max-siz.patch
Patch80: 0080-Client-set-constraint-adjustments-for-popups-in-xdg.patch Patch80: 0080-Client-set-constraint-adjustments-for-popups-in-xdg.patch
@ -180,6 +188,9 @@ popd
%changelog %changelog
* Thu Jan 05 2023 Jan Grulich <jgrulich@redhat.com> - 5.15.8-1
- 5.15.8
* Mon Oct 31 2022 Jan Grulich <jgrulich@redhat.com> - 5.15.7-1 * Mon Oct 31 2022 Jan Grulich <jgrulich@redhat.com> - 5.15.7-1
- 5.15.7 - 5.15.7

View File

@ -1 +1 @@
SHA512 (qtwayland-everywhere-opensource-src-5.15.7.tar.xz) = a004a82ec2b4f132d597ae3c82b4079671ecdfeed09c455073e552197da2b9f921c85bef2b40be76e87e61d5ec1e7ab39ed232be26b27d9aed6e938c659965a3 SHA512 (qtwayland-everywhere-opensource-src-5.15.8.tar.xz) = 6c6e9dc20f98d71abd7dba54ff278bf4535e70f86bfc4e6dd46c1af7c87777f045a6aba02bba3eb786f7cf383da5fb72b03e1e6ec636c8be0cde0e4e5b7b5b2d