From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 4CF5C15808B for ; Tue, 1 Oct 2024 18:10:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 84DEEE29A2; Tue, 1 Oct 2024 18:10:35 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6C4BAE29A2 for ; Tue, 1 Oct 2024 18:10:35 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 88BCB340C57 for ; Tue, 1 Oct 2024 18:10:34 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E7E4ABE7 for ; Tue, 1 Oct 2024 18:10:32 +0000 (UTC) From: "Ionen Wolkens" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ionen Wolkens" Message-ID: <1727806082.d855faed9dc5e08c6d0ab5dd35242faf5ca8e799.ionen@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-qt/qtbase/files/, dev-qt/qtbase/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-qt/qtbase/files/qtbase-6.7.3-erratic-mouse-input.patch dev-qt/qtbase/qtbase-6.7.3-r1.ebuild dev-qt/qtbase/qtbase-6.7.3.ebuild X-VCS-Directories: dev-qt/qtbase/files/ dev-qt/qtbase/ X-VCS-Committer: ionen X-VCS-Committer-Name: Ionen Wolkens X-VCS-Revision: d855faed9dc5e08c6d0ab5dd35242faf5ca8e799 X-VCS-Branch: master Date: Tue, 1 Oct 2024 18:10:32 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: a298659a-e7c4-41b9-935d-8f439543a6f2 X-Archives-Hash: c42f3ca97a5db2c434e57e9505151d31 commit: d855faed9dc5e08c6d0ab5dd35242faf5ca8e799 Author: Ionen Wolkens gentoo org> AuthorDate: Mon Sep 30 21:45:55 2024 +0000 Commit: Ionen Wolkens gentoo org> CommitDate: Tue Oct 1 18:08:02 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d855faed dev-qt/qtbase: revert upstream commit causing erratic mouse input Signed-off-by: Ionen Wolkens gentoo.org> .../files/qtbase-6.7.3-erratic-mouse-input.patch | 156 +++++++++++++++++++++ ...{qtbase-6.7.3.ebuild => qtbase-6.7.3-r1.ebuild} | 1 + 2 files changed, 157 insertions(+) diff --git a/dev-qt/qtbase/files/qtbase-6.7.3-erratic-mouse-input.patch b/dev-qt/qtbase/files/qtbase-6.7.3-erratic-mouse-input.patch new file mode 100644 index 000000000000..14bdf1463949 --- /dev/null +++ b/dev-qt/qtbase/files/qtbase-6.7.3-erratic-mouse-input.patch @@ -0,0 +1,156 @@ +https://bugreports.qt.io/browse/QTBUG-129509 +https://bugreports.qt.io/browse/QTBUG-129514 +https://codereview.qt-project.org/c/qt/qtbase/+/594889 +From 42845904d51ad14b2ab41a165bd9b9b1a9459840 Mon Sep 17 00:00:00 2001 +From: Liang Qi +Date: Tue, 01 Oct 2024 12:46:30 +0200 +Subject: [PATCH] Revert "xcb: handle XI2 input button and motion events from slave devices" + +This reverts commit b71be292780b858f2c55ce92601452e2ea946de2, which causes a regression when using mouse wheel and moving cursor together +on scroll bar for some qt applications, like qutebrowser and +qbittorrent. + +Fixes: QTBUG-129509 +Fixes: QTBUG-129514 +Task-number: QTBUG-110841 +Pick-to: 6.8.0 6.8 6.7 6.5 6.2 5.15 +Change-Id: I703158874413a1306ea99217bced4ba38382f543 +--- a/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp ++++ b/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp +@@ -683,94 +683,21 @@ + } + +-//implementation is ported from https://codereview.qt-project.org/c/qt/qtbase/+/231552/12/src/plugins/platforms/xcb/qxcbconnection_xi2.cpp#558 +-namespace { +- +-/*! \internal +- +- Qt listens for XIAllDevices to avoid losing mouse events. This function +- ensures that we don't process the same event twice: from a slave device and +- then again from a master device. +- +- In a normal use case (e.g. mouse press and release inside a window), we will +- drop events from master devices as duplicates. Other advantage of processing +- events from slave devices is that they don't share button state. All buttons +- on a master device share the state. +- +- Examples of special cases: +- +-\list +- +-\li During system move/resize, window manager (_NET_WM_MOVERESIZE) grabs the +- master pointer, in this case we process the matching release from the slave +- device. A master device event is not sent by the server, hence no duplicate +- event to drop. If we listened for XIAllMasterDevices instead, we would never +- see a release event in this case. +- +-\li If we dismiss a context menu by clicking somewhere outside a Qt application, +- we will process the mouse press from the master pointer as that is the +- device we are grabbing. We are not grabbing slave devices (grabbing on the +- slave device is buggy according to 19d289ab1b5bde3e136765e5432b5c7d004df3a4). +- And since the event occurs outside our window, the slave device event is +- not sent to us by the server, hence no duplicate event to drop. +- +-\endlist +-*/ +-bool isDuplicateEvent(xcb_ge_event_t *event) +-{ +- Q_ASSERT(event); +- +- struct qXIEvent { +- bool isValid = false; +- uint16_t sourceid; +- uint8_t evtype; +- uint32_t detail; +- int32_t root_x; +- int32_t root_y; +- }; +- static qXIEvent lastSeenEvent; +- +- bool isDuplicate = false; +- auto *xiDeviceEvent = reinterpret_cast(event); +- if (lastSeenEvent.isValid) { +- isDuplicate = lastSeenEvent.sourceid == xiDeviceEvent->sourceid && +- lastSeenEvent.evtype == xiDeviceEvent->event_type && +- lastSeenEvent.detail == xiDeviceEvent->detail && +- lastSeenEvent.root_x == xiDeviceEvent->root_x && +- lastSeenEvent.root_y == xiDeviceEvent->root_y; +- } else { +- lastSeenEvent.isValid = true; +- } +- lastSeenEvent.sourceid = xiDeviceEvent->sourceid; +- lastSeenEvent.evtype = xiDeviceEvent->event_type; +- lastSeenEvent.detail = xiDeviceEvent->detail; +- lastSeenEvent.root_x = xiDeviceEvent->root_x; +- lastSeenEvent.root_y = xiDeviceEvent->root_y; +- +- if (isDuplicate) { +- qCDebug(lcQpaXInputEvents, "Duplicate XI2 event %d", event->event_type); +- // This sanity check ensures that special cases like QTBUG-59277 keep working. +- lastSeenEvent.isValid = false; // An event can be a duplicate only once. +- } +- +- return isDuplicate; +-} +- +-} // namespace +- + void QXcbConnection::xi2HandleEvent(xcb_ge_event_t *event) + { + auto *xiEvent = reinterpret_cast(event); +- if (m_xiSlavePointerIds.contains(xiEvent->deviceid)) { +- if (!(xiEvent->event_type == XCB_INPUT_BUTTON_PRESS +- || xiEvent->event_type == XCB_INPUT_BUTTON_RELEASE +- || xiEvent->event_type == XCB_INPUT_MOTION)) { +- if (!m_duringSystemMoveResize) +- return; +- if (xiEvent->event == XCB_NONE) +- return; +- +- if (xiEvent->event_type == XCB_INPUT_TOUCH_END) +- abortSystemMoveResize(xiEvent->event); ++ setTime(xiEvent->time); ++ if (m_xiSlavePointerIds.contains(xiEvent->deviceid) && xiEvent->event_type != XCB_INPUT_PROPERTY) { ++ if (!m_duringSystemMoveResize) ++ return; ++ if (xiEvent->event == XCB_NONE) ++ return; + ++ if (xiEvent->event_type == XCB_INPUT_BUTTON_RELEASE ++ && xiEvent->detail == XCB_BUTTON_INDEX_1 ) { ++ abortSystemMoveResize(xiEvent->event); ++ } else if (xiEvent->event_type == XCB_INPUT_TOUCH_END) { ++ abortSystemMoveResize(xiEvent->event); ++ return; ++ } else { + return; + } +@@ -784,25 +711,9 @@ + case XCB_INPUT_BUTTON_PRESS: + case XCB_INPUT_BUTTON_RELEASE: +- case XCB_INPUT_MOTION: { +- if (isDuplicateEvent(event)) +- return; +- if (m_xiSlavePointerIds.contains(xiEvent->deviceid)) { +- if (m_duringSystemMoveResize) { +- if (xiEvent->event_type == XCB_INPUT_BUTTON_RELEASE +- && xiEvent->detail == XCB_BUTTON_INDEX_1 ) { +- abortSystemMoveResize(xiEvent->event); +- } else { +- return; +- } +- } +- } +- xiDeviceEvent = xiEvent; +- eventListener = windowEventListenerFromId(xiDeviceEvent->event); +- sourceDeviceId = xiDeviceEvent->sourceid; // use the actual device id instead of the master +- break; +- } ++ case XCB_INPUT_MOTION: + case XCB_INPUT_TOUCH_BEGIN: + case XCB_INPUT_TOUCH_UPDATE: +- case XCB_INPUT_TOUCH_END: { ++ case XCB_INPUT_TOUCH_END: ++ { + xiDeviceEvent = xiEvent; + eventListener = windowEventListenerFromId(xiDeviceEvent->event); diff --git a/dev-qt/qtbase/qtbase-6.7.3.ebuild b/dev-qt/qtbase/qtbase-6.7.3-r1.ebuild similarity index 99% rename from dev-qt/qtbase/qtbase-6.7.3.ebuild rename to dev-qt/qtbase/qtbase-6.7.3-r1.ebuild index 83f66ef4cd47..07859a84c2e5 100644 --- a/dev-qt/qtbase/qtbase-6.7.3.ebuild +++ b/dev-qt/qtbase/qtbase-6.7.3-r1.ebuild @@ -147,6 +147,7 @@ PATCHES=( "${FILESDIR}"/${PN}-6.6.3-gcc14-avx512fp16.patch "${FILESDIR}"/${PN}-6.7.2-qcontiguouscache.patch "${FILESDIR}"/${PN}-6.7.2-haswell-no-rdrnd.patch + "${FILESDIR}"/${PN}-6.7.3-erratic-mouse-input.patch ) src_prepare() {