Re: Phantom mouse movement issues with macOS

2023-09-13 Thread Richard Kimberly Heck

On 9/13/23 02:56, Jürgen Spitzmüller wrote:

Am Mittwoch, dem 13.09.2023 um 08:51 +0200 schrieb Pavel Sanda:

Hopefully, this is fixed now. Juergen, how straightforward would be
backporting for 2.3.x? I think this one deserves it.

Not completely straightforward, but doable, I think.


OK by me.

Riki


--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Phantom mouse movement issues with macOS

2023-09-13 Thread Jürgen Spitzmüller
Am Mittwoch, dem 13.09.2023 um 08:51 +0200 schrieb Pavel Sanda:
> Hopefully, this is fixed now. Juergen, how straightforward would be
> backporting for 2.3.x? I think this one deserves it.

Not completely straightforward, but doable, I think.

-- 
Jürgen
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Phantom mouse movement issues with macOS

2023-09-13 Thread Pavel Sanda
On Tue, Sep 05, 2023 at 07:57:55PM +0200, Pavel Sanda wrote:
> I would ask all reportes in trac whether they can reproduce with beta5
> and unless we obtain new complaint, we should tentatively consider it
> solved...

Hopefully, this is fixed now. Juergen, how straightforward would be
backporting for 2.3.x? I think this one deserves it.

Pavel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Phantom mouse movement issues with macOS

2023-09-05 Thread Pavel Sanda
On Mon, Sep 04, 2023 at 05:51:46PM +0200, Pavel Sanda wrote:
> I have limited access to that machine so the only testing point in my hand is 
> 2.3.7 + Qt 5.15 + Mac OS 12.6 (via homebrew).
> I might be able to get another data point about 2.4 beta 5 + Qt 5 + Mac Os 
> 13.5 (via our provided dmg).

New data points:
LyX 2.3.4.2 + Qt 5.9.8 + MacOS 13.5.1 - problem occurs
LyX 2.4.0 beta 3 + Qt 5.15.10 + MacOS 13.5.1 - problem occurs
LyX 2.4.0 beta 4 + Qt 5.15.10 + MacOS 13.5.1 - problem did not occur (yet)

By "problem" I specifically mean opening first Foot inset in User's Guide by
"clicking" (=deeper touch which causes mechanical click, however Mac people
call it) on touchpad.

Certain caution should be applied for the beta4 result, as the problem
is not 100% reproducible, but I gave it 5 min try for many insets within
UG and could not find a problematic case.

I would ask all reportes in trac whether they can reproduce with beta5
and unless we obtain new complaint, we should tentatively consider it
solved...

Pavel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Phantom mouse movement issues with macOS

2023-09-05 Thread Jürgen Spitzmüller
Am Dienstag, dem 05.09.2023 um 15:36 +0200 schrieb Jean-Marc
Lasgouttes:
> But I have to admit that I do not understand all the ramifications of
> doing this. I am ambivalent on the change, to be frank. We could just
> keep it in mind in case the issue reappears.

So be it, then.

-- 
Jürgen
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Phantom mouse movement issues with macOS

2023-09-05 Thread Jean-Marc Lasgouttes

Le 05/09/2023 à 15:27, Jürgen Spitzmüller a écrit :

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?


Yes, except that this syntax does not work ith Qt6 and that with Qt6 one 
will have to compare int(e->position().x()), because the coordinates are 
now QPointF.


But I have to admit that I do not understand all the ramifications of 
doing this. I am ambivalent on the change, to be frank. We could just 
keep it in mind in case the issue reappears.


JMarc
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Phantom mouse movement issues with macOS

2023-09-05 Thread Jürgen Spitzmüller
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-70 (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


Re: Phantom mouse movement issues with macOS

2023-09-05 Thread Jürgen Spitzmüller
Am Dienstag, dem 05.09.2023 um 15:19 +0200 schrieb Jean-Marc
Lasgouttes:
> Indeed, this is why I thought we may want to have this
> unconditionally as early as possible; It cannot hurt, as I see it.

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).

-- 
Jürgen
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Phantom mouse movement issues with macOS

2023-09-05 Thread Jean-Marc Lasgouttes

Le 05/09/2023 à 15:10, Jürgen Spitzmüller a écrit :

Am Dienstag, dem 05.09.2023 um 14:51 +0200 schrieb Pavel Sanda:

I double checked that the problem I report with 2.3.7 is on Qt
5.15.7.


Plus that bug was on Windows, the new ones are on Mac. But the effect
is the same, signaling a mouse movement when the mouse didn't move.


Indeed, this is why I thought we may want to have this unconditionally 
as early as possible; It cannot hurt, as I see it.


JMarc
--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Phantom mouse movement issues with macOS

2023-09-05 Thread Jürgen Spitzmüller
Am Dienstag, dem 05.09.2023 um 15:12 +0200 schrieb Pavel Sanda:
> Actually, where do you read 5.15.1?

https://bugreports.qt.io/browse/QTBUG-85431

-- 
Jürgen
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Phantom mouse movement issues with macOS

2023-09-05 Thread Pavel Sanda
On Tue, Sep 05, 2023 at 02:51:17PM +0200, Pavel Sanda wrote:
> On Tue, Sep 05, 2023 at 02:39:43PM +0200, Jürgen Spitzmüller wrote:
> > Looks at least related. But it seems not the same bug, as this one is
> > said to be fixed in Qt 5.15.1
> 
> I double checked that the problem I report with 2.3.7 is on Qt 5.15.7.

Actually, where do you read 5.15.1?
I see in the bug itself: Fix Version/s: 6.2.8, 6.5.0, 6.6.0

Pavel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Phantom mouse movement issues with macOS

2023-09-05 Thread Jürgen Spitzmüller
Am Dienstag, dem 05.09.2023 um 14:51 +0200 schrieb Pavel Sanda:
> I double checked that the problem I report with 2.3.7 is on Qt
> 5.15.7.

Plus that bug was on Windows, the new ones are on Mac. But the effect
is the same, signaling a mouse movement when the mouse didn't move.

-- 
Jürgen
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Phantom mouse movement issues with macOS

2023-09-05 Thread Pavel Sanda
On Tue, Sep 05, 2023 at 02:39:43PM +0200, Jürgen Spitzmüller wrote:
> Looks at least related. But it seems not the same bug, as this one is
> said to be fixed in Qt 5.15.1

I double checked that the problem I report with 2.3.7 is on Qt 5.15.7.

Pavel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Phantom mouse movement issues with macOS

2023-09-05 Thread Jürgen Spitzmüller
Am Dienstag, dem 05.09.2023 um 14:04 +0200 schrieb Jean-Marc
Lasgouttes:
> The fix looks good in principle. How does this relate with the code
> at the beginning of GuiWorkArea::mouseMoveEvent? 

Looks at least related. But it seems not the same bug, as this one is
said to be fixed in Qt 5.15.1

> Would making this code unconditional solve our issue? We could
> replace the equality check with a distance less than a pixel, for
> example.

My idea was that all issues that have been reported were on inset
buttons. And on the other hand, when playing on Linux, I found it odd
as well that the button did not open when I was just moving on the
button (even more than a pixel). So to me personally, the new behavior
"feels" better even on Linux. But this is purely subjective.

-- 
Jürgen
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Phantom mouse movement issues with macOS

2023-09-05 Thread Jean-Marc Lasgouttes

Le 04/09/2023 à 16:39, Jürgen Spitzmüller a écrit :

Am Montag, dem 04.09.2023 um 16:31 +0200 schrieb Jean-Marc Lasgouttes:

Dear Devvies,

These last weeks I have seen without really thinking about them
several
macOS issues where mouse movement occurred when they should not.

I decided to search Qt bugs about that and voilà!:
https://bugreports.qt.io/browse/QTBUG-70

This bug has been fixed in Qt 6.5. It is not clear whether it existed
in 5.x.

Does this ring a bell?


It does. See

https://www.lyx.org/trac/ticket/12418

and the fix that (maybe only humbly) addresses this.


The fix looks good in principle. How does this relate with the code at 
the beginning of GuiWorkArea::mouseMoveEvent? Would making this code 
unconditional solve our issue? We could replace the equality check with 
a distance less than a pixel, for example.


JMarc


--
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Phantom mouse movement issues with macOS

2023-09-05 Thread Pavel Sanda
On Mon, Sep 04, 2023 at 06:04:49PM +0200, Jürgen Spitzmüller wrote:
> Am Montag, dem 04.09.2023 um 17:51 +0200 schrieb Pavel Sanda:
> > I have limited access to that machine so the only testing point in my
> > hand is 2.3.7 + Qt 5.15 + Mac OS 12.6 (via homebrew).
> 
> The fix is not in 2.3.x, so we only know it works if someone can check
> master or beta5.

I paid closer attention now and at least I can say that in 2.3.7 when 
the click does not work the inset is put into selection - the idea
of some "micromovement" seems right.

Another problem is reproducibility. Some insets work just fine and some
insets do not. The issue is probably where in the window is the inset
located. The same inset is ok when in the middle of line, when I move
it on the begining of the next line the clicks stop working (reproducible
for the given case).
What that unf means is it's not immediatelly clear on new configuration
whether the problem is there or not.

Pavel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Phantom mouse movement issues with macOS

2023-09-04 Thread Jürgen Spitzmüller
Am Montag, dem 04.09.2023 um 17:51 +0200 schrieb Pavel Sanda:
> I have limited access to that machine so the only testing point in my
> hand is 2.3.7 + Qt 5.15 + Mac OS 12.6 (via homebrew).

The fix is not in 2.3.x, so we only know it works if someone can check
master or beta5.

-- 
Jürgen
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Phantom mouse movement issues with macOS

2023-09-04 Thread Pavel Sanda
On Mon, Sep 04, 2023 at 05:29:35PM +0200, Jürgen Spitzmüller wrote:
> Am Montag, dem 04.09.2023 um 17:10 +0200 schrieb Pavel Sanda:
> > The problem is that I see #12820 on Qt 5 while we try
> > to avoid releasing with Qt 6 because of #12641.
> 
> You see this bug with current master? This would be bad.

I have limited access to that machine so the only testing point in my hand is 
2.3.7 + Qt 5.15 + Mac OS 12.6 (via homebrew).
I might be able to get another data point about 2.4 beta 5 + Qt 5 + Mac Os 13.5 
(via our provided dmg).
No real debugging session available unfortuntely.

The landscape on BigSur is more complicated per Daniel's report:
"
I can reproduce a clicking problem on macOS 11.7.9 ) with
LyX 2.4.0-beta3 (Qt 15.5.10) 
But I cannot reproduce with
LyX 2.3.7 (Qt 15.5.7)
LyX 2.4.0-beta2 (Qt 6.4.1) 
"

What a mess.
Pavel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Phantom mouse movement issues with macOS

2023-09-04 Thread Jürgen Spitzmüller
Am Montag, dem 04.09.2023 um 17:10 +0200 schrieb Pavel Sanda:
> The problem is that I see #12820 on Qt 5 while we try
> to avoid releasing with Qt 6 because of #12641.

You see this bug with current master? This would be bad.

-- 
Jürgen
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Phantom mouse movement issues with macOS

2023-09-04 Thread Pavel Sanda
On Mon, Sep 04, 2023 at 04:39:13PM +0200, Jürgen Spitzmüller wrote:
> > I decided to search Qt bugs about that and voil??!:
> > https://bugreports.qt.io/browse/QTBUG-70
> > 
> > This bug has been fixed in Qt 6.5. It is not clear whether it existed
> > in 5.x.
> > 
> > Does this ring a bell?

I am guessing this was a rhetorical one :)

> https://www.lyx.org/trac/ticket/12418
> 
> I think the following bugs are variants of this:
> 
> https://www.lyx.org/trac/ticket/12820

The problem is that I see #12820 on Qt 5 while we try
to avoid releasing with Qt 6 because of #12641.
Maybe time to focus on #12641 again? :)

Pavel
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel


Re: Phantom mouse movement issues with macOS

2023-09-04 Thread Jürgen Spitzmüller
Am Montag, dem 04.09.2023 um 16:31 +0200 schrieb Jean-Marc Lasgouttes:
> Dear Devvies,
> 
> These last weeks I have seen without really thinking about them
> several 
> macOS issues where mouse movement occurred when they should not.
> 
> I decided to search Qt bugs about that and voilà!:
> https://bugreports.qt.io/browse/QTBUG-70
> 
> This bug has been fixed in Qt 6.5. It is not clear whether it existed
> in 5.x.
> 
> Does this ring a bell?

It does. See

https://www.lyx.org/trac/ticket/12418

and the fix that (maybe only humbly) addresses this.

I think the following bugs are variants of this:

https://www.lyx.org/trac/ticket/12820
https://www.lyx.org/trac/ticket/12279

-- 
Jürgen
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel