summaryrefslogtreecommitdiff
path: root/dev-qt/qtwayland
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-07-12 12:25:39 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-07-12 12:25:39 +0100
commit37bccfe5e76c5740c4ef5ba1179e9488d8404075 (patch)
treec0c962a2e83c1f38816a021ecd34c2e8c80db528 /dev-qt/qtwayland
parent496ef6155c315ac3628b472dc9b4146fa2684286 (diff)
gentoo auto-resync : 12:07:2024 - 12:25:38
Diffstat (limited to 'dev-qt/qtwayland')
-rw-r--r--dev-qt/qtwayland/Manifest3
-rw-r--r--dev-qt/qtwayland/files/qtwayland-6.7.2-drag-drop.patch67
-rw-r--r--dev-qt/qtwayland/files/qtwayland-6.7.2-thread-safety.patch65
-rw-r--r--dev-qt/qtwayland/qtwayland-6.7.2-r2.ebuild67
4 files changed, 202 insertions, 0 deletions
diff --git a/dev-qt/qtwayland/Manifest b/dev-qt/qtwayland/Manifest
index b751cee64660..a5db30443687 100644
--- a/dev-qt/qtwayland/Manifest
+++ b/dev-qt/qtwayland/Manifest
@@ -1,4 +1,6 @@
+AUX qtwayland-6.7.2-drag-drop.patch 2349 BLAKE2B e22347050b017831c8039700dc3658c468e2e4577df2e9afabd73574b311c3f8c2ed5ca40138cd9b4bdf1e2bb9e4c5333ab2856a1a46e879ca84308f7cf585d4 SHA512 ea6780aed6ec30dae53e73d7be9329b1daa59db704c6d32aff776a72b12411fa1a0d4376d1bf295a57df9761e2f81d3644d626d37f7a7490324ee79dbd23ce5d
AUX qtwayland-6.7.2-plasma-popup.patch 1032 BLAKE2B 81a0c2dceac3bde808f463d0d2ad6159fd362528b2b37ed018283a05e4d317f6d31fcf87815e2b041aece5f49ae60bd4dfd7a2861aa2ea71f914343e6ff422ad SHA512 c5a63dfd9ff7a3a36bc7fce76b7c6b7ceb12b03dd9f758690cbfca715afc8989c747b4a535749ee44f6827e3af576d614050e0672263a32b420dd37aee008fb0
+AUX qtwayland-6.7.2-thread-safety.patch 2420 BLAKE2B 4e5d871bd93a24cc2bb5c879a9eb336aacbfe20c3a6df15777ccdfb41a4d2b84484097a7d0680a5c02631cb84864259cdc9e68d04b0ab654275bd73ec92700b8 SHA512 18978aac57472575ee2dbcd44d1dbb7d21e6a116589cd78d9530272e0c67c8e730d2bf8272cc92cbd78d460ba710cb408595e11c59dca2649d8565cf4e7b135f
DIST qtwayland-5.15.14-gentoo-kde-1.tar.xz 47472 BLAKE2B 3812e5f18bcb857cf3c76cf8a53525a84b14bc4cf8430f4339c1ef9a5d6208dcdfba3f052bcc80c6ad8815db2415207e2eb5ed07bbf9e7076be675f2a4cee3c0 SHA512 912bc902e4f9d945dac396c75a2af9896e3002535a51e6b5b07166c38b9d6ea073da3d93db07742a0db295dd5f8167fdef351230adcb2145704c36b576c0f5e3
DIST qtwayland-everywhere-opensource-src-5.15.14.tar.xz 560916 BLAKE2B a5edb21446348f20e6f65736b402c3075a4bde0d7fa02c24cbfc5de65739ca8d7ac2186bd17a995bfb3de23106e696e2b1321dc3ae401984bdafaa3479c9aa1e SHA512 9e8add52353f7a146759511c49c001cd76a56790a81af5222f6f2d3d1a2f1ee9cc62048c72efe69708eb3444c6115272d4af8d738df7b1e1da959359d7420dbb
DIST qtwayland-everywhere-src-6.7.1.tar.xz 1122036 BLAKE2B 93acec00864f7f112b442ed60dbd1c297d08695ebccd6755bdc46b40af0e5f69288c9b404fc1d43fc0217bdeb1e770c4ec3950a33c67b577da4f0c308e6867b1 SHA512 9128ecd32319fd2ca154cb3d52726c80f96e2c906f9cf80cd67a3f91a4db49a853948489ec712061c6ef2c5abe70cd850c37f947659199678ac1482c77485a76
@@ -6,6 +8,7 @@ DIST qtwayland-everywhere-src-6.7.2.tar.xz 1123220 BLAKE2B 70c2d8942afc4e1629d2e
EBUILD qtwayland-5.15.14.ebuild 1214 BLAKE2B 4d974a96e807dfbad6bf480bb6faf022828c9cab0fd5bc82b6c6455344fafd7a349f1f232fa62a00e32cc073cda39aead004657e7b4072f49890442baeda3252 SHA512 75966f4a890e77a29937d63ed50a8095d579fab4871f2d091bb410443a0101fabc592a6cfbe033b12d6f0663c196930a32c85a062a10de4f8dc13eee4103b86b
EBUILD qtwayland-6.7.1.ebuild 1476 BLAKE2B 562d8812d8d5aaabe8942dda7789cffdf55d9544eec04fb9bee2503f6abb74fa7914c5224c8dd0db794ec309dfe700ebced6f7c709af1d5614fdcde475221324 SHA512 9418a1600472831aa16a061f0a92cd32a2b712b08018238f2f71d21c1c505e94cff8a58982e5f9fdbb34c4863cad689a5f54ec470d0338c79aae21f515adb261
EBUILD qtwayland-6.7.2-r1.ebuild 1527 BLAKE2B efe529b2925dc1ec8ce987a3eed243afcece1963d84345aeb1b758d5fbbe59d29c06229eaa4ee88f9fd2f776ed9f34136f9c0750b9be3bbc1fcad93fc076ec14 SHA512 001a07a9ee53545f18ca970c9dc7caece8055a1eb559d6e52fc0a1c5e6c7f9b14ff03098c203d6f1f823283b6b1143edba980258073f0eb884b82e9d570d6026
+EBUILD qtwayland-6.7.2-r2.ebuild 1609 BLAKE2B dc92fd51dd6ddf104845bc682d7b4c1388f59e6c5937a6ef77c37f2e3015adf088ade2276b008bac5bb90b03d7cb83774857bf1e31e0dd2adfb323190dcea29a SHA512 4824a37fe6511187ff0909d1ae086b4f9aa96c5c98fe27a4a0723c54ad257d4d5f6ce0eef0b0c73ee0650a860977dc843bf0f03a6604218e8324dfd7ee0c626e
EBUILD qtwayland-6.7.9999.ebuild 1229 BLAKE2B a2ef0eece20a69fae358c8c0e22dd05c7d5a04cdd508e1ecb90883c87a6bc365db6443413e7a2150282d26ba8666361b281bd261f5f7a34b0bff24abf96bb723 SHA512 9465226c56e239182b87812bf532ba63e2632830d24e5b7aff53160ba587834bdb7faf9dde05da61084e0a44551cbbbd5599f0988ed92c0e0bc77a016a0ce289
EBUILD qtwayland-6.8.9999.ebuild 1604 BLAKE2B 955233e9dce7287eab5e8ccb13b548e44bc31dc71a195f665c1422a33045a309a131cf4443714a31799a2c1a387fc0ffc1d4f653c6b7bd25de77cae8f92c2e68 SHA512 374607e7b5f0e65e89ce1dc9e2cb714212a876c556826ca92cfb347a6a7bea8dd2f94e3455dd3e2fd66cf16a5e23350e2ca4fb316139626eb0c7bc46f66fb800
EBUILD qtwayland-6.9999.ebuild 1604 BLAKE2B 955233e9dce7287eab5e8ccb13b548e44bc31dc71a195f665c1422a33045a309a131cf4443714a31799a2c1a387fc0ffc1d4f653c6b7bd25de77cae8f92c2e68 SHA512 374607e7b5f0e65e89ce1dc9e2cb714212a876c556826ca92cfb347a6a7bea8dd2f94e3455dd3e2fd66cf16a5e23350e2ca4fb316139626eb0c7bc46f66fb800
diff --git a/dev-qt/qtwayland/files/qtwayland-6.7.2-drag-drop.patch b/dev-qt/qtwayland/files/qtwayland-6.7.2-drag-drop.patch
new file mode 100644
index 000000000000..6141d95cb834
--- /dev/null
+++ b/dev-qt/qtwayland/files/qtwayland-6.7.2-drag-drop.patch
@@ -0,0 +1,67 @@
+Backport from upcoming 6.7.3[1][2] for [3][4].
+
+[1] https://github.com/qt/qtwayland/commit/85ec3ae70b905ddf9e16d86c468446d74867743f
+[2] https://codereview.qt-project.org/c/qt/qtwayland/+/565408
+[3] https://bugs.kde.org/show_bug.cgi?id=482770
+[4] https://bugs.kde.org/show_bug.cgi?id=490059
+
+From: =?UTF-8?q?Niccol=C3=B2=20Venerandi?= <niccolo@venerandi.com>
+Date: Mon, 3 Jun 2024 12:19:59 +0200
+Subject: [PATCH] Emit a LeaveEvent on drag and drop start
+
+All focused windows will now receive a LeaveEvent when a drag and drop starts.
+This makes sure that the dragged element does not preserve any hover decoration
+during the drag and drop, and that other elements that happen to take place
+of the dragged elements don't become hovered too.
+--- a/src/client/qwaylanddnd.cpp
++++ b/src/client/qwaylanddnd.cpp
+@@ -29,4 +29,9 @@
+ void QWaylandDrag::startDrag()
+ {
++ // Some compositors do not send a pointer leave before starting a drag, some do.
++ // This is discussed upstream at: https://gitlab.freedesktop.org/wayland/wayland/-/issues/444
++ // For consistency between compositors we emit the leave event here, upon drag start.
++ m_display->currentInputDevice()->handleStartDrag();
++
+ QBasicDrag::startDrag();
+ QWaylandWindow *icon = static_cast<QWaylandWindow *>(shapedPixmapWindow()->handle());
+--- a/src/client/qwaylandinputdevice.cpp
++++ b/src/client/qwaylandinputdevice.cpp
+@@ -524,4 +524,10 @@
+ }
+
++void QWaylandInputDevice::handleStartDrag()
++{
++ if (mPointer)
++ mPointer->leavePointers();
++}
++
+ #if QT_CONFIG(wayland_datadevice)
+ void QWaylandInputDevice::setDataDevice(QWaylandDataDevice *device)
+@@ -880,4 +886,12 @@
+ window->handleMouse(mParent, e);
+ }
++}
++
++void QWaylandInputDevice::Pointer::leavePointers()
++{
++ if (auto *window = focusWindow()) {
++ LeaveEvent e(focusWindow(), mSurfacePos, mGlobalPos);
++ window->handleMouse(mParent, e);
++ }
+ }
+
+--- a/src/client/qwaylandinputdevice_p.h
++++ b/src/client/qwaylandinputdevice_p.h
+@@ -93,4 +93,5 @@
+ void setCursor(const QCursor *cursor, const QSharedPointer<QWaylandBuffer> &cachedBuffer = {}, int fallbackOutputScale = 1);
+ #endif
++ void handleStartDrag();
+ void handleEndDrag();
+
+@@ -321,4 +322,5 @@
+ public:
+ void releaseButtons();
++ void leavePointers();
+
+ QWaylandInputDevice *mParent = nullptr;
diff --git a/dev-qt/qtwayland/files/qtwayland-6.7.2-thread-safety.patch b/dev-qt/qtwayland/files/qtwayland-6.7.2-thread-safety.patch
new file mode 100644
index 000000000000..92be3b81d5b0
--- /dev/null
+++ b/dev-qt/qtwayland/files/qtwayland-6.7.2-thread-safety.patch
@@ -0,0 +1,65 @@
+Backport from 6.8 branch which should later land in 6.7.3 in [1] for [2].
+
+[1] https://codereview.qt-project.org/c/qt/qtwayland/+/574983
+[2] https://bugs.kde.org/show_bug.cgi?id=489180
+
+From: David Edmundson <davidedmundson@kde.org>
+Date: Fri, 05 Jul 2024 16:13:40 +0100
+Subject: [PATCH] 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.
+--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
++++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow.cpp
+@@ -51,4 +51,13 @@
+ 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);
+ }
+@@ -61,12 +70,15 @@
+ // 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
+--- a/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow_p.h
++++ b/src/hardwareintegration/client/wayland-egl/qwaylandeglwindow_p.h
+@@ -61,5 +61,11 @@
+
+ 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;
+ };
+
diff --git a/dev-qt/qtwayland/qtwayland-6.7.2-r2.ebuild b/dev-qt/qtwayland/qtwayland-6.7.2-r2.ebuild
new file mode 100644
index 000000000000..eab3c3a8d3a5
--- /dev/null
+++ b/dev-qt/qtwayland/qtwayland-6.7.2-r2.ebuild
@@ -0,0 +1,67 @@
+# Copyright 2021-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit qt6-build
+
+DESCRIPTION="Wayland platform plugin for Qt"
+
+if [[ ${QT6_BUILD_TYPE} == release ]]; then
+ KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~sparc ~x86"
+fi
+
+IUSE="accessibility compositor qml vulkan"
+
+RDEPEND="
+ dev-libs/wayland
+ ~dev-qt/qtbase-${PV}:6[accessibility=,gui,opengl,vulkan=,wayland]
+ media-libs/libglvnd
+ x11-libs/libxkbcommon
+ compositor? (
+ qml? ( ~dev-qt/qtdeclarative-${PV}:6 )
+ )
+"
+DEPEND="
+ ${RDEPEND}
+ vulkan? ( dev-util/vulkan-headers )
+"
+BDEPEND="dev-util/wayland-scanner"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-plasma-popup.patch
+ "${FILESDIR}"/${P}-drag-drop.patch
+ "${FILESDIR}"/${P}-thread-safety.patch
+)
+
+CMAKE_SKIP_TESTS=(
+ # segfaults for not-looked-into reasons, but not considered
+ # an issue given >=seatv5 exists since wayland-1.10 (2016)
+ tst_seatv4
+ # needs a compositor/opengl, skip the extra trouble
+ tst_surface
+ tst_xdgdecorationv1
+ # known failing with wayland-1.23.0 (or at least with offscreen), not
+ # believed to result in critical runtime issues so skip until this is
+ # looked at upstream (https://bugreports.qt.io/browse/QTBUG-126379)
+ tst_client
+ tst_compositor
+ tst_scaling
+)
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake_use_find_package qml Qt6Quick)
+ $(qt_feature compositor wayland_server)
+ )
+
+ qt6-build_src_configure
+}
+
+src_test() {
+ # users' session setting may break tst_clientextension (bug #927030)
+ unset DESKTOP_SESSION XDG_CURRENT_DESKTOP
+ unset GNOME_DESKTOP_SESSION_ID KDE_FULL_SESSION
+
+ qt6-build_src_test
+}