Am Dienstag, dem 05.09.2023 um 15:21 +0200 schrieb Jürgen Spitzmüller:
> I agree that this is a good idea. Just wondering whether it should be
> done next to the current fix which does a bit more for inset buttons
> (see my other comment on why I like that).

Like this?

-- 
Jürgen
diff --git a/src/frontends/qt/GuiWorkArea.cpp b/src/frontends/qt/GuiWorkArea.cpp
index 099b129bb7..650c204aee 100644
--- a/src/frontends/qt/GuiWorkArea.cpp
+++ b/src/frontends/qt/GuiWorkArea.cpp
@@ -760,20 +760,15 @@ void GuiWorkArea::mouseReleaseEvent(QMouseEvent * e)
 
 void GuiWorkArea::mouseMoveEvent(QMouseEvent * e)
 {
-#if (QT_VERSION > QT_VERSION_CHECK(5,10,1) && \
-	QT_VERSION < QT_VERSION_CHECK(5,15,1))
-	// cancel the event if the coordinates didn't change, this is due to QtBug
-	// QAbstractScrollArea::mouseMoveEvent, the event is triggered falsely when quickly
-	// double tapping a touchpad. To test: try to select a word by quickly double tapping
-	// on a touchpad while hovering the cursor over that word in the work area.
-	// This bug does not occur on Qt versions 5.10.1 and below. Only Windows seems to be affected.
-	// ML thread: https://www.mail-archive.com/lyx-devel@lists.lyx.org/msg211699.html
-	// Qt bugtracker: https://bugreports.qt.io/browse/QTBUG-85431
-	// Bug was fixed in Qt 5.15.1
-	if (e->x() == d->synthetic_mouse_event_.cmd.x() && // QtBug QAbstractScrollArea::mouseMoveEvent
-			e->y() == d->synthetic_mouse_event_.cmd.y()) // QtBug QAbstractScrollArea::mouseMoveEvent
-		return; // QtBug QAbstractScrollArea::mouseMoveEvent
-#endif
+	// Cancel the event if the coordinates didn't change.
+	// Sometimes false movements are communicated, e.g., see
+	// https://bugreports.qt.io/browse/QTBUG-85431 (Windows only)
+	// https://bugreports.qt.io/browse/QTBUG-111170 (Mac only)
+	// Both bugs have been fixed in Qt meanwhile, but it does not harm
+	// to check this here.
+	if (e->x() == d->synthetic_mouse_event_.cmd.x()
+	    && e->y() == d->synthetic_mouse_event_.cmd.y())
+		return;
 
 	// we kill the triple click if we move
 	doubleClickTimeout();
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to